G
Gary''s Student
I am having trouble getting Paint started:
Sub paint1()
Dim ReturnValue, i
ReturnValue = Shell("C:\WINDOWS\system32\mspaint.exe", 1)
AppActivate ReturnValue
End Sub
Raises a run time error 5
Sub paint2()
Dim ReturnValue, i
ReturnValue = Shell("C:\WINDOWS\system32\mspaint.exe", 1)
MsgBox (ReturnValue)
AppActivate ReturnValue
End Sub
Works just fine. Why do I need the MsgBox() before the AppActivate??
Sub paint1()
Dim ReturnValue, i
ReturnValue = Shell("C:\WINDOWS\system32\mspaint.exe", 1)
AppActivate ReturnValue
End Sub
Raises a run time error 5
Sub paint2()
Dim ReturnValue, i
ReturnValue = Shell("C:\WINDOWS\system32\mspaint.exe", 1)
MsgBox (ReturnValue)
AppActivate ReturnValue
End Sub
Works just fine. Why do I need the MsgBox() before the AppActivate??