Hi
I am new in programming, I'd like to ask a basic question.
How to run *.vbs or *.bat in Excel VBS
I tried the code but it didn't work
Sub Test()
Set ws = WScript.CreateObject("WScript.Shell")
ws.Run ("Notepad")
End Sub
thanks~
Visual Basic for Applications (VBA)
Hi
I am new in programming, I'd like to ask a basic question.
How to run *.vbs or *.bat in Excel VBS
I tried the code but it didn't work
Sub Test()
Set ws = WScript.CreateObject("WScript.Shell")
ws.Run ("Notepad")
End Sub
thanks~
Hey,
Here you goĦ
Sub Test()
Set ws = CreateObject("WScript.Shell")
ws.Run ("Notepad")
End Sub
Best Regards
Cathrine
Hi Cathrine
It works, thank you very much.
My further question is
How to set batch file background work
Sub Test()
Set ws = CreateObject("WScript.Shell")
ws.Run ("batch.bat")
End Sub
BR,
CCplus
Hey,
You must use the full path to the file...
Sub Test()
Set ws = CreateObject("WScript.Shell")
ws.Run ("C:\batch.bat")
End Sub
Cath