Launching executable file
-
Dear All, I am having difficulty in running the following code: - Basically, i am writing this code in Window XP and it run well. But, when i changed to Window 98, it run the notepad.exe, but also pup-up the message box. May i know what is the problem here. The followings are the exact code that i used in XP and 98. Thank in advance. Merry Xmas n happy new year... Dim x As Integer Private Sub Form_Load() On Error GoTo Err x = Shell("Notepad.exe", vbHide) Unload Me Exit Sub Err: MsgBox "File Not Found", vbCritical Unload Me End Sub
-
Dear All, I am having difficulty in running the following code: - Basically, i am writing this code in Window XP and it run well. But, when i changed to Window 98, it run the notepad.exe, but also pup-up the message box. May i know what is the problem here. The followings are the exact code that i used in XP and 98. Thank in advance. Merry Xmas n happy new year... Dim x As Integer Private Sub Form_Load() On Error GoTo Err x = Shell("Notepad.exe", vbHide) Unload Me Exit Sub Err: MsgBox "File Not Found", vbCritical Unload Me End Sub
in the error handler take a look at the error message and error number to give an indication as to why your handler is being called.
Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."