Program - Novice

  • Thread starter Thread starter NickH
  • Start date Start date
N

NickH

Hi
In the Subroutine below, when I try to compile it I get
the following error message for RetVal.
"Expected Sub, Function, or Property"

Code

Sub Auto_Open()
RowPointer = 1
RetVal Shell(CmdLine, 4)
If RetVal = 0 Then
Beep: MsgBox ("Cannot Find CPS")
Exit Sub
End If
Application.Wait Now + 0.00001
AppActivate Application.Caption
GetSerialData
End Sub

Any help would be appreciated
Thanks
 
Hi
change the line
RetVal Shell(CmdLine, 4)

to
RetVal = Shell(CmdLine, 4)
 
Just need an equals sign

RetVal = Shell(CmdLine, 4)


ciao
KM

----- NickH wrote: -----

Hi
In the Subroutine below, when I try to compile it I get
the following error message for RetVal.
"Expected Sub, Function, or Property"

Code

Sub Auto_Open()
RowPointer = 1
RetVal Shell(CmdLine, 4)
If RetVal = 0 Then
Beep: MsgBox ("Cannot Find CPS")
Exit Sub
End If
Application.Wait Now + 0.00001
AppActivate Application.Caption
GetSerialData
End Sub

Any help would be appreciated
Thanks
 
Thankyou
Compiled ok
-----Original Message-----
Hi
change the line
RetVal Shell(CmdLine, 4)

to
RetVal = Shell(CmdLine, 4)


--
Regards
Frank Kabel
Frankfurt, Germany



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top