I'm having a strange issue with a particular client running an external executable. I've done this very same thing before, and in fact it works fine from other machines using the same application. But on this one machine I get this runtime error. Here is the code:
Private Sub cmdClock_Click()
Dim X As Long
Dim handle As Long
Dim cmndStr As String
handle = FindWindow("ThunderRT6FormDC", "Scalper Cycle Clock")
If handle <> 0 Then
AppActivate "Scalper Cycle Clock"
X = ShowWindow(handle, 1)
X = SetWindowFocus(handle)
cmndStr = "\\hmnassrvr\HMNASSRVR_D\Applications\Scalper_Cycle_TM\Scalper Cycle TM.exe "
X = Shell(cmndStr, 1)
I thought maybe there was a problem with the spaces in the executable name, but I removed them and still have the problem. This machine runs other external applications from within this VB app with out any problems. Any Ideas?