From the VBE window, go to Tools > References and set a reference to the
"Windows Script Host Object Model" Something like the following should
launch your hta file:
Sub RunHTAfile()
Dim wsh As Object
Set wsh = CreateObject("WScript.Shell")
wsh.Run "C:\test\Page1.hta"
End Sub
An hta file is essentially an html file that gets run by mshta.exe rather
than Internet Explorer or other browser. There are a few extra features of
hta files not found in standard html but a major advantage (or risk) is that
the page can run scripts and controls without the security restrictions
imposed by the browser based on the user's security settings.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.