Shell function to open Calculator

David Ball

Registered User.
Local time
Today, 19:20
Joined
Aug 9, 2010
Messages
230
Hi,
I want to open the Calculator by clicking a command button (using the On Click event).
I have tried the code below but can’t get it working. What do I need to change?

Private Sub Command7_Click()
Dim RetVal As Integer
RetVal = Shell("C:\Windows\calc.exe", 1)

End Sub

Thanks very much
Dave
 
Try the below:
Code:
  Dim RetVal As Variant
  RetVal = Shell("calc.exe", 1)
 
That works. Thanks very much.

(I couldn't find the "Thumbs Up" to click it!)
 

Users who are viewing this thread

Back
Top Bottom