Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Ask user a file name
You have to open it, no question about it. GetOpenFilename returns the
selected filename with full path which you can use to open the file, do your copy, then close it. -- __________________________________ HTH Bob "Lucile" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User replaces existing file with blank during file open | Excel Discussion (Misc queries) | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming |