Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2006

Tip: Looking for answers? Try searching our database.

Open file with VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Otto Moehrbach - 11 Dec 2006 12:16 GMT
Excel XP & Win XP
I know how to open an Excel Workbook file.
What I want to do is open a non-Excel file when I know the full file name:
"C:\ThePath\FileName.xxx"
Thanks for your time.  Otto
ankur - 11 Dec 2006 12:23 GMT
Hi Otto,

Try..

Sub test()

   Workbooks.Open Filename:="C:\ThePath\FileName.xxx"

End Sub

Regards
Ankur
www.xlmacros.com

> Excel XP & Win XP
> I know how to open an Excel Workbook file.
> What I want to do is open a non-Excel file when I know the full file name:
> "C:\ThePath\FileName.xxx"
> Thanks for your time.  Otto
Otto Moehrbach - 11 Dec 2006 12:33 GMT
Ankur
   Thanks for responding.  That doesn't work.  The error message says that
the requested file is not an Excel-compatible file.  The file I want to open
is:
"C:\Program Files\Mozilla Thunderbird\thunderbird.exe"
I tried your method also with the following: (Outlook Express)
"C:\Program Files\Outlook Express\msimn.exe"
Thanks again.  Otto

> Hi Otto,
>
[quoted text clipped - 16 lines]
>> "C:\ThePath\FileName.xxx"
>> Thanks for your time.  Otto
Kweenie - 11 Dec 2006 13:02 GMT
You can achieve that by creating a hyperlink.
Right-click in a cell.
Choose Hyperlink and navigate to the desired program.

Regards

Piet

Otto Moehrbach schreef:

> Ankur
>     Thanks for responding.  That doesn't work.  The error message says that
[quoted text clipped - 25 lines]
> >> "C:\ThePath\FileName.xxx"
> >> Thanks for your time.  Otto
Otto Moehrbach - 11 Dec 2006 14:14 GMT
Kweenie
   Thanks, but this is all part of a VBA procedure to email an Excel sheet.
I'm following Ron de Bruin's email code and I'm assuming that the pertinent
email program has to be open and running before the email code runs.  Otto

> You can achieve that by creating a hyperlink.
> Right-click in a cell.
[quoted text clipped - 37 lines]
>> >> "C:\ThePath\FileName.xxx"
>> >> Thanks for your time.  Otto
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.