Hi,
I want to open up windows calculator from my form instead of making one so i created a new module and put this code in:
Sub LoadEXE(Dir As String)
X% = Shell(Dir, 1): NoFreeze% = DoEvents(): Exit Sub
End Sub
and attached this code to a button on the form:
Private Sub cmdCalculator_Click()
LoadEXE "C:\WINDOWS\calc.exe"
End Sub
and when i try it, the form opens the calculator but this error box pops up saying:
Run-time error '6':
Overflow
Anyone know what I'm doing wrong?
Thanks....
I want to open up windows calculator from my form instead of making one so i created a new module and put this code in:
Sub LoadEXE(Dir As String)
X% = Shell(Dir, 1): NoFreeze% = DoEvents(): Exit Sub
End Sub
and attached this code to a button on the form:
Private Sub cmdCalculator_Click()
LoadEXE "C:\WINDOWS\calc.exe"
End Sub
and when i try it, the form opens the calculator but this error box pops up saying:
Run-time error '6':
Overflow
Anyone know what I'm doing wrong?
Thanks....