Archive of Mr Excel Message Board

Back to Excel VBA archive index
Back to archive home

macro needs to access a file which currently does not exist .
Posted by Tonyg on August 30, 2001 2:59 AM
I need my macro to pause and get a file reference before it continues to create a pivot table from the file. The file will be created at the end of each Quarter year and hopefully the macro will transfer some of the data to a more comprehensive Spreadsheet.Has anyone come across this problem? If so how is it overcome?

| Check out our Excel VBA Resources
|
 |
 |
 |
 |
 |
Re: macro needs to access a file which currently does not exist .
Posted by Dax on August 30, 2001 4:30 AM
Hello,
Have a look at Application.GetOpenfilename method. It brings up the standard open dialog box and allows the user to select a file. It returns the full path of the file selected which you can then use in your macro.
HTH,
Dax.

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.