VBA Help

ai1094

Board Regular
Hi,

I have a macro that selects a different excel workbook and copies all the data from the opened workbook into the existing. See below:

Set Wbk1 = ActiveWorkbook
Fname = "L:\GCRE\Financial Modeling.xlsm"
Set Wbk2 = Workbooks.Open(Fname)
Wbk2.Sheets(1).Copy , Wbk1.Sheets(Wbk1.Sheets.Count)
Wbk2.Close False


Now, the code works. However, the workbook I am opening is also a macro-enabled workbook, which refreshes 3 different workbooks using Power Query in Excel. All 3 workbooks are refreshed and appended into the Financial Modeling.xlsm. The problem is, the workbooks aren't getting refreshed. Was wondering if anyone had an idea why?
 

MPaul100

New Member
You could create a macro to refresh them and call that one from your existing macro posted here. If it supposed to run on workbook open event automatically, then you need to add a wait for calculations event in the macro posted to wait for them to be refreshed before copying the data over.
 

Some videos you may like

This Week's Hot Topics

Top