Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Open file with VBA

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Open file with VBA


Hi Otto,

Try..

Sub test()

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

End Sub

Regards
Ankur
www.xlmacros.com


Otto Moehrbach wrote:

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Open file with VBA

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
"ankur" wrote in message
ups.com...

Hi Otto,

Try..

Sub test()

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

End Sub

Regards
Ankur
www.xlmacros.com


Otto Moehrbach wrote:

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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Open file with VBA

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
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
"ankur" wrote in message
ups.com...

Hi Otto,

Try..

Sub test()

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

End Sub

Regards
Ankur
www.xlmacros.com


Otto Moehrbach wrote:

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Open file with VBA

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

"Kweenie" wrote in message
oups.com...
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
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
"ankur" wrote in message
ups.com...

Hi Otto,

Try..

Sub test()

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

End Sub

Regards
Ankur
www.xlmacros.com


Otto Moehrbach wrote:

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






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
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
Open a file do a macro ( made) and open next succesive file SVTman74 Excel Programming 5 April 21st 06 10:14 PM
Open File or Switch Between Windows if File is Open Ricky Pang Excel Programming 2 July 8th 05 05:51 AM
Open File or Switch Between Windows if File is Open Ricky Pang Excel Programming 0 July 2nd 05 08:41 PM


All times are GMT +1. The time now is 03:10 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"