![]() |
How to ask user for file to open
I have a template that I am putting a macro that will load data from another spreadsheet. However, I do not know what the other spreadsheet name will be. How can I ask the user to open the spreadsheet that contains the data
Thank Dwaine Horto York International |
How to ask user for file to open
Dwain
one way is to use an inputbox to request the information from the user. Something like filetoget = InputBox("Enter the name of the file to open.", , "c:\temp\filetoopen.xls" This will give a variable with the filename (including path if required) which can then be used to open the file Workbooks.Open FileName:=filetoge Ton ----- Dwaine Horton wrote: ---- I have a template that I am putting a macro that will load data from another spreadsheet. However, I do not know what the other spreadsheet name will be. How can I ask the user to open the spreadsheet that contains the data Thank Dwaine Horto York International |
How to ask user for file to open
Hi
another way: filename=Application.getopenfilename("Excel Files (*.xls), *.xls") -- Regards Frank Kabel Frankfurt, Germany Dwaine Horton wrote: I have a template that I am putting a macro that will load data from another spreadsheet. However, I do not know what the other spreadsheet name will be. How can I ask the user to open the spreadsheet that contains the data? Thanks Dwaine Horton York International |
All times are GMT +1. The time now is 03:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com