winniepough
Programmer
Option Explicit
Private Executable As String
Public Sub Form_Load()
'--------------------------------
Call Launch
'--------------------------------
End Sub
Public Sub Launch()
'--------------------------------
Executable = "E:\TC2000CD\TC2000.exe "
Call Shell(Executable, vbNormalFocus)
'--------------------------------
'IF THIS WAS ALL THE CODE THEN, THE FILE LOADS AND IS IN FOCUS
'WHEN THE NEXT INSTRUCTION IS EXECUTED, THE PROGRAM GOES TO THE TASK BAR AND IS DISPLAYED IN ORANGE
'THE REMAINDER OF THE CODE BELOW SEEMS TO NOT 'FOCUS' ON THE EXECUTABLE
'THE FOLLOWING, IF MANUALLY EXECUTED ON THE PROGRAM FUNCTIONS NORMALLY, TO DO WHAT I WANT THEM TO DO. Help!!!!
SendKeys "%(D)", False '"ALT + D", DataBase, pulldown menu
SendKeys "%(U)", False '"ALT + U", Update DataBase
SendKeys "%(U)", False '"ALT + U", Selects Internet vs. Dial - Up
'program Dial-Up later
While Timer < Now + "00:01.00" 'set up timer for DSL update
DoEvents 'definitely should finish in that time
Wend
SendKeys "(ESC)", False 'Kill the Worden Notes pop-up
SendKeys "(ESC)", False ' in case there are two 'pop-ups' to close
SendKeys "%{F4}", False 'Send ALT+F4 to close
End Sub
Private Executable As String
Public Sub Form_Load()
'--------------------------------
Call Launch
'--------------------------------
End Sub
Public Sub Launch()
'--------------------------------
Executable = "E:\TC2000CD\TC2000.exe "
Call Shell(Executable, vbNormalFocus)
'--------------------------------
'IF THIS WAS ALL THE CODE THEN, THE FILE LOADS AND IS IN FOCUS
'WHEN THE NEXT INSTRUCTION IS EXECUTED, THE PROGRAM GOES TO THE TASK BAR AND IS DISPLAYED IN ORANGE
'THE REMAINDER OF THE CODE BELOW SEEMS TO NOT 'FOCUS' ON THE EXECUTABLE
'THE FOLLOWING, IF MANUALLY EXECUTED ON THE PROGRAM FUNCTIONS NORMALLY, TO DO WHAT I WANT THEM TO DO. Help!!!!
SendKeys "%(D)", False '"ALT + D", DataBase, pulldown menu
SendKeys "%(U)", False '"ALT + U", Update DataBase
SendKeys "%(U)", False '"ALT + U", Selects Internet vs. Dial - Up
'program Dial-Up later
While Timer < Now + "00:01.00" 'set up timer for DSL update
DoEvents 'definitely should finish in that time
Wend
SendKeys "(ESC)", False 'Kill the Worden Notes pop-up
SendKeys "(ESC)", False ' in case there are two 'pop-ups' to close
SendKeys "%{F4}", False 'Send ALT+F4 to close
End Sub