Opening files...

S

Steve Yandl

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


Steve
 
S

Steve Yandl

Tom,

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.

Steve
 
Top