I'm trying to use the GetOpenFileName method to pick up a file without actually opening it. Then I will use data from this file to populate several other worksheets that are opened.
However, I need to be able to reference a specific sheet on the file I select with the GetOpenFileName method.
In other macros I've written, I've used the code below where getFile is a function that contains the Application.GetOpenFileName method.
So essentially, I need to do the same thing but eliminate the middle step of opening the workbook but still be able to define the sheet in the 3rd line. Is this possible? Any assistance will be helpful. Thanks!
I'm using Excel 2002
However, I need to be able to reference a specific sheet on the file I select with the GetOpenFileName method.
In other macros I've written, I've used the code below where getFile is a function that contains the Application.GetOpenFileName method.
Code:
Templatename = getFile("Select dashboard file")
Set Templatebook = Workbooks.Open(Templatename)
Set Templatesheet = Templatebook.Sheets("abc")
I'm using Excel 2002