My final goal is to have a Dialog box that pulls information from an excel spreadsheet if a date in the excel row is less than 6 months from the current date, but at the moment I am stuck at getting it to recognize that the excel date is the same as the current date generated within the script.
It works when I wright it out like this:
Let>R2_EAS=11/15/2009
Getdate>Current_Date
Messagemodal>current_Date
Messagemodal>R2_EAS
If>R2_EAS=Current_Date
Messagemodal>it worked
Else
Endif
But I want to replace the first line (Let>R2_EAS=11/15/2009) with either a DDERequest or something else to imput the date into the script, but when I do it doesn't recognize it no matter what I do:
DDERequest>Excel,(Path)\(File_Name).xlsx,R2C8,R2_EAS,10
(R2C8 has the Current Date.)
Getdate>Current_Date
Messagemodal>current_Date
Messagemodal>R2_EAS
If>R2_EAS=Current_Date
Messagemodal>it worked
Else
Endif
I have been using the Debugger, but I can't figure it out..
Problems Conserning Result Variables... I think =S
Moderators: JRL, Dorian (MJT support)
When you use DDERequest it grabs the cell plus carriage return and line feed characters. If you want to compare the DDERequest result to the date you have to either add those two characters to the date or strip the characters from the DDERequest result.
Code: Select all
DDERequest>Excel,(Path)\(File_Name).xlsx,R2C8,R2_EAS,10
(R2C8 has the Current Date.)
Getdate>Current_Date
Messagemodal>current_Date
Messagemodal>R2_EAS
//If>R2_EAS=Current_Date
If>R2_EAS=%Current_Date%%CRLF%
Messagemodal>it worked
Else
EndIf
//OR (in my opinion preferred)
StringReplace>R2_EAS,%CRLF%,,R2_EAS
If>R2_EAS=Current_Date
Messagemodal>it worked
Else
EndIf