View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default browse to find file

fname = Application.GetOpenfileName

This will display the fileopen dialog and return the name and path of the
file selected (or typed in). It will not open the file. You can then use
the results to copy the file. The dichotomy here is that it is unclear what
file is being copied.

--
Regards,
Tom Ogilvy



"Steph" wrote in message
...
Hello. Is it possible to have excel via vba allow a user to browse

through
folders (like when a user clicks on FileOpen), but instead of actually
opening the file they select, I would like the file to be copied to a
specified location (variable called infopath) AND also have the name of

the
file selected inserted into cell A1?

Thanks!