Hello,
I have an Access application that opens another application via CreateObject and runs through some scripts. Works fine. However, sometimes when multitasking with Word for example and typing. The CreateObject pops up WITH FOCUS and while i'm typing in Word will start to capture my strokes messing up my script.
Question. Is there a way to set focus away when it opens or open it in such away it does not accept any user input while running it's script?
Below is the example code i have for opening up the application.
Code:
Sub PullPendingLog_SmarTermOn Error GoTo PullPendingLog_SmarTerm_Err
Set Application = CreateObject("SmarTerm.Application")
Set Session = Application.Sessions.Open("\\dcms1ms\sharedlabs\Laboratory\LAB USE ONLY\Web Shortcuts\SmarTerm\SmarTerm SQLAB Live LVR.stw")
sDir = "C:\Documents and Settings\" & UserNameWindows & "\Application Data\MST Pending"
sTextFileName = "URC_Pending.txt"
'With Application
Application.Visible = True