Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if syntax error

Status
Not open for further replies.

indswamy

Programmer
Jan 7, 2009
16
US
could tell me what is the syntax error in the below.
thanks in advance.

if MyScreen.SendKeys("F"CurrentMonthName "<ENTER>")
 
i am trying to check if this month do something or lastmonth do somehting
this is the code i provide here. but when i have messagbox here it is not displaying anything
x = MyScreen.SendKeys("F CurrentMonthName <ENTER>")
MsgBox x
if x then
Call Found
elseif MyScreen.SendKeys("F LastMonthEnd <ENTER>") then
if strEOFerrormsg = "End of data reached" or strEOFerrormsg = "Scroll at maximum " then

Call Endpgm
Else
Call Found
end if
End if
End if

End Sub
 
Hi

Code:
x = MyScreen.SendKeys("F CurrentMonthName <ENTER>")
is sending LITERALLY... F CurrentMonthName

I believe that you want to send F Jan

Yes?

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 

thansk Skip
i am trying to have last month
this functionhas given 1
i need to have month MMM ie jan

Month(DateSerial(1, Month(Now), 1)) - 1
how do it do it.
thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top