View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default inputbox vs. userform/combobox vs. Windows file handlers ???

List,

Take a look at the GetOpenFilename method in VBA. It presents the file open
dialog box, and the user can select, but it doesn't open it, just returns
the selected filename (full path).

--

HTH

RP

"List Lurker" wrote in message
. ..
Hi All:

I need to prompt the user for the name of a secondary workbook, and then
given that "other" filename, use it to replace a "place-holder" filename
in some formulas.

I can do all the search/replace in VBA, and if need by I can use an
INPUTBOX to have the user enter the secondary filename (meaning either
they type it in or copy it from the clipboard).

What would be nice (since filenames are looooong), however, is if I
could present the user w/ some dialboge box that displays all possible
XLS files (having drilled down to some directory, etc.) and then have
the user simply highlight the desired file and presss OK (or something
like that), thus capturing the filename as a VBA variable.

Can that be done easily, or will I have to use standard Window file
diaglogue boxes, etc. and would that mean that the secondary file simply
gets opened vs. capturing its filename as a VBA variable?

Hope the above is clear,

Any help/advice would be much obliged.

Regards