ai1094

Board Regular
Joined
Aug 23, 2018
Messages
92
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?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
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.
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,954
Members
448,535
Latest member
alrossman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top