View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default GetOpenFileName to select a .URL file

The excel FILE commands don't want to see the "http:" as part of the file
name. HTTP is the protocol for transfering the file, not the name. You can
open a file by using "//root/subdirect/abc.xls". Don't use
"http://root/subdirect/abc.xls"

To be able to see network files, you have to mount the network directory on
you computer. You can do in the windows explorer (not internet) using the
menu Tools - Mount Network Drive. Once the Netwrok dirive is mounted then
you can use GetOpenFilename.

"Gary''s Student" wrote:

I need to pick a file (including the path), I have:

Sub pickOne()
s = Application.GetOpenFilename
MsgBox (s)
End Sub

to select a file. If I select a .xls file, I see the full path and file name:

C:\Temp\x.xls

If I select an internet shortcut, I see:
http://www.cnn.com

What I need is:
C:\Temp\x.url
the full path and filename


Can I get GetOpenFileName to give me the full path and filename, or should I
be using something else?
--
Gary''s Student - gsnu200781