Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jd jd is offline
external usenet poster
 
Posts: 91
Default Opening files...

I need to open an hta file using visual basic. Can't figure it out.

Please help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Opening files...

I don't know what an hta file is, but it isn't listed as a supported file.

--
Regards,
Tom Ogilvy

"JD" wrote in message
...
I need to open an hta file using visual basic. Can't figure it out.

Please help!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Opening files...

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


"JD" wrote in message
...
I need to open an hta file using visual basic. Can't figure it out.

Please help!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Opening files...

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


"Tom Ogilvy" wrote in message
...
I don't know what an hta file is, but it isn't listed as a supported file.

--
Regards,
Tom Ogilvy

"JD" wrote in message
...
I need to open an hta file using visual basic. Can't figure it out.

Please help!





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening files Pennsy Nut New Users to Excel 1 March 11th 09 04:04 PM
show most recent files first when opening excel files Anne` Excel Discussion (Misc queries) 5 January 23rd 08 01:54 AM
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 PoundMutt Excel Discussion (Misc queries) 1 June 20th 07 03:50 AM
How can I view files chronologically when opening multiple files Stevilsize Excel Discussion (Misc queries) 3 July 26th 05 12:49 AM
Opening Files Dave[_32_] Excel Programming 2 October 16th 03 06:25 PM


All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"