Reputation: 21
Alright, so I am creating a simple program that should, when you click the link open another .HTA file. For example:
Sub RunProgram
Const NORMAL_WINDOW = 1
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "explorer.exe", "Virus_Support.hta", , , NORMAL_WINDOW
End Sub
Then later on...
<body>
<button onclick="RunProgram">Run Program</button> <p>
</body>
However, it returns a 'Variable is undefined: objShell' error. I am trying to get virus_support.hta to open up from the SupportMain.hta file...not on IE or any browser.
Upvotes: 0
Views: 3390
Reputation: 8902
Try this:
Sub RunProgram
Set objShell = CreateObject("WScript.shell")
objShell.run("Virus_Support.hta")
End Sub
Upvotes: 0