trying to exc. program (shell problem)

  • Thread starter Thread starter Russ via AccessMonster.com
  • Start date Start date
R

Russ via AccessMonster.com

Hello, have the following code,

Private Sub Calc_Click()
Dim RetVal
RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator.
End Sub

but when Itry to compile I get this error;
Compile error; Expected variable or procedure, not project

What am I doing wrong? What else do I need?
 
You sure that's where calc.exe is located? On my XP Home machine, it's in
C:\Windows\System32. When I made that change to your code, it worked fine.
 
Back
Top