View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lucile Lucile is offline
external usenet poster
 
Posts: 16
Default Ask user a file name

Hello,

I need to write a macro that asks the user the name of a excel file and then
copy a sheet of it into a new workbooks without opening the file.

I already start with this piece of code, but I do not know how to use the
file name:

file= Application.GetOpenFilename(FileFilter:="Excel Files (*.XLS), *.XLS", _
Title:="Select File To Be Opened")
If file = False Then _
Exit Sub

Thanks