I have a macro that opens a few spreadsheets which pull in data from Bloomberg which takes a few seconds. After the formulas are updated I have a second macro that I want to paste over the data as values.
However when I try to activate the name of the workbook in the second macro I get the following error: Run-time error ‘424’; Object required.
Code from first macro which is on ABC workbook:
Set XYZBook = ActiveWorkbook
(random code here)
XYZBook.Activate
(wait for formulas to update)
2nd macro also on ABC workbook first tries to do XYZBook.activate and fails.
However when I try to activate the name of the workbook in the second macro I get the following error: Run-time error ‘424’; Object required.
Code from first macro which is on ABC workbook:
Set XYZBook = ActiveWorkbook
(random code here)
XYZBook.Activate
(wait for formulas to update)
2nd macro also on ABC workbook first tries to do XYZBook.activate and fails.