bbakker09
03-22-2016, 12:09 PM
Greetings Everyone,
I have done a lot of searching but haven't been successful at finding code to solve my problem.
My goal is this: to have a button in an otherwise empty workbook which when clicked will, open a browser window to select an excel file, select a specific sheet in the newly opened excel, copy that sheet, and paste in the originally active workbook. The issue I've run into is that the excel file I'm browsing for is a budget which itself has many macros and seems to be interrupting the other code sequences I've researched.
I have tried various codes using the Application.GetOpenFilename with copy and paste coding, but I can't seem to get the code to "wait" until the external excel is finished being opened before it copy/pastes the sheet.
My guess is that I need two separate "Sub" sections or two separate macros. One to open the excel and one to copy the data. I am making a general form for many people to use, so I can't know the specific name of the excel file I'm opening. The workbook with the button will remain fixed.
Thank you for your help.
I have done a lot of searching but haven't been successful at finding code to solve my problem.
My goal is this: to have a button in an otherwise empty workbook which when clicked will, open a browser window to select an excel file, select a specific sheet in the newly opened excel, copy that sheet, and paste in the originally active workbook. The issue I've run into is that the excel file I'm browsing for is a budget which itself has many macros and seems to be interrupting the other code sequences I've researched.
I have tried various codes using the Application.GetOpenFilename with copy and paste coding, but I can't seem to get the code to "wait" until the external excel is finished being opened before it copy/pastes the sheet.
My guess is that I need two separate "Sub" sections or two separate macros. One to open the excel and one to copy the data. I am making a general form for many people to use, so I can't know the specific name of the excel file I'm opening. The workbook with the button will remain fixed.
Thank you for your help.