我正在尝试自动执行任务,我将不得不在应用程序中执行某些操作。由于我正在自动化这些东西,我不希望应用程序对用户可见,因为我将在后台执行我的操作。我正在使用键盘命令控制应用程序。
`
Private Sub DPS_Click()
Dim x As Variant
Dim Path As String
With Application
.ScreenUpdating = False
.DisplayAlerts = False
.EnableEvents = False
End With
'Set the Path variable equal to the path of your program's installation
Path = "C:\xyz\xyz.exe"
x = Shell(Path, vbNormalFocus)
Application.SendKeys ("%as")
Application.SendKeys (....)
Application.SendKeys (.....)
With Application
.ScreenUpdating = True
.DisplayAlerts = True
.EnableEvents = True
End With`
但是应用程序仍然对用户可见,并且操作不在后台完成。欢迎任何输入。提前致谢