View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
VBANovice VBANovice is offline
external usenet poster
 
Posts: 12
Default Open Dialog Box to return Selected File Path and Not Open it.

Tom,

what if I only want the path to be remembered because i'm going to loop
through multiple files in the folder?

"Tom Ogilvy" wrote:

Dim fName as String
fName = Application.GetOpenFileName

will do exactly that. fName will hold the fully qualified name of the file
the user wants to open, selected through the File=Open dialog. It does not
open the file.

--
Regards,
Tom Ogilvy

"DMS" wrote in message
...
All,
I am trying to find a way for my users to select a file that is going to

be
imported so that I can get the filepath. I do not want to open the file.

In other words I have a Text Box that says, "Where is the file located".

I
want the user to be able to click a "Search" button and browse for their

file
just like they would with the Open Dialog Box. But instead of opening the
file, I just want the filepath to replace the "Where is the file located"
text.

Thanks
DMS