trying to exc. program (shell problem)

  • Thread starter Russ via AccessMonster.com
  • 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?
 
D

Douglas J. Steele

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.
 

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

Top