Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Open a file - Application unknown

I want to be able to open a file without stating the application to
open it. Not unlike adding a hyperlink to a cell value.

Only, I want it done in VBA since it must take some variables. The
following works great if the path to the application is known.

Dim x As Variant
x = Shell( AppPath & " " & FilePath, 1)

However, i want it to take the windows default application to open the
file. Again, much like the result a hyperlink produces. Simply
omitting the AppPath results in an Error 5, something like "invalid
procedure call or invalid argument".

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Open a file - Application unknown

EDIT: found a solution that works for me:

http://chrisrae.com/vba/routines/shellexecute.html

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 a file in Excel starts application but dose not open file Bob Shelton Excel Discussion (Misc queries) 1 July 2nd 08 07:51 PM
Open unknown file name Jan Excel Programming 4 March 9th 06 02:51 AM
How do I start a new application when I open a file? jkwillis99 Excel Discussion (Misc queries) 1 January 13th 06 01:16 PM
Can Excel open a new application every time you open a file? shoon Setting up and Configuration of Excel 0 December 13th 05 03:28 PM
Open file with unknown extra characters at end of filename achidsey Excel Programming 1 October 19th 05 09:21 PM


All times are GMT +1. The time now is 07:14 AM.

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"