![]() |
Selecting filename in Visual Basic
I am trying to write a macro using VBA that prompts the user to make a
filename selection in order to make the necessary changes to each workbook. The same macro will be run on each workbook. |
Selecting filename in Visual Basic
Your post is a little thin on details. Are the files already open? Are they
XL files? Did you just need to get a list of file names or do you need to open the files? -- HTH... Jim Thomlinson "Bruce Htown" wrote: I am trying to write a macro using VBA that prompts the user to make a filename selection in order to make the necessary changes to each workbook. The same macro will be run on each workbook. |
Selecting filename in Visual Basic
Here is the longer version. I have created a Macro in order to make
corrections to an Excell spreadsheet from a Master template. The macro is setup to make the changes to the selected spreadsheet, but I need to have the ability to have the user select the file since we have about 700 to 800 files that need to be corrected. The problem that I have is creating the script to prompt the user to select the file. I have tried the "FileName" select script but I get an error message and the macro stops running. "Jim Thomlinson" wrote: Your post is a little thin on details. Are the files already open? Are they XL files? Did you just need to get a list of file names or do you need to open the files? -- HTH... Jim Thomlinson "Bruce Htown" wrote: I am trying to write a macro using VBA that prompts the user to make a filename selection in order to make the necessary changes to each workbook. The same macro will be run on each workbook. |
Selecting filename in Visual Basic
Application.GetOpenFilename opens the native Excel "Open" dialog and
returns a user-selected filename as a string variable: See http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx HTH, JP On Mar 18, 5:55*pm, Bruce Htown wrote: Here is the longer version. *I have created a Macro in order to make corrections to an Excell spreadsheet from a Master template. *The macro is setup to make the changes to the selected spreadsheet, but I need to have the ability to have the user select the file since we have about 700 to 800 files that need to be corrected. *The problem that I have is creating the script to prompt the user to select the file. *I have tried the "FileName" select script but I get an error message and the macro stops running. |
All times are GMT +1. The time now is 05:46 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com