This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Macro syntax error (definitely operator error)

I've been scrubbing google to find a quick reference for macro coding in Attachmate extra! unsuccessfully. Could someone point me to a URL to learn what I need to know, tell me how to resolve the code below or both.

I took a "Hello World" example and a recorded macro and mushed the below code together, which does what i need with a couple exceptions.

Dim dlgHello as HelloDialog 'Declare the dialog file.

nRet = Dialog (dlgHello)
Select Case nRet 'dlgHello.AllButtons
    Case - 1        ' OKButton
        Sess0. Screen. Sendkeys ("Show a60:4aug;a")
        Sess0. Screen. Sendkeys("<Enter>")
        Sess0. Screen.WaitHostQuiet (g HostSettleTime)
        System. Timeoutvalue = OldsystemTimeout
        Msabox "Done"
    Case 0 ' CancelButton
        Msgbox  "Goodbye! "
End Select

While this code above works, I need to change it to pull system date and subtract two days.

Original code Sess0. Screen. Sendkeys ("Show a60:4aug;a")

Instead of the static 4aug, I need the code to pull the system date then subtract two days.

My failed attempt was Sess0. Screen. Sendkeys ("Show a60:"Today() -2"a")

Would be grateful if anyone could tell me how to resolve this and also point me to a good learning resource. Thanks


Mainframe Access