All
I am new to the msg board and I am about to toss the monitor out the window!
I have a macro which loops thru a list of cost centres in one workbook, copies each cost centre to a template workbook ("causal tracksv2) and then refreshes the workbook twice (this is because we use an Excel add in, the data cube TM1, which must sometimes send on first refresh and then receive data on second refresh).
When the code gets to the first refresh, the run time error in the subject of this posting occurs. When I hit debug and then carry on as normal without changing anything, the macro continues running as it should.
The run time error happens every time there is a new cost centre, and there are alot of them! The offending code seems to be the 2nd last line in:
While Cells(i, 1) <> ""
CC = Cells(i, 1)
Workbooks("causal tracksv2").Activate
Cells(1, 1).Select
ActiveCell.FormulaR1C1 = CC
Workbooks.Application.Calculate
Workbooks.Application.Calculate
Any help would be appreciated!
Thanks!
I am new to the msg board and I am about to toss the monitor out the window!
I have a macro which loops thru a list of cost centres in one workbook, copies each cost centre to a template workbook ("causal tracksv2) and then refreshes the workbook twice (this is because we use an Excel add in, the data cube TM1, which must sometimes send on first refresh and then receive data on second refresh).
When the code gets to the first refresh, the run time error in the subject of this posting occurs. When I hit debug and then carry on as normal without changing anything, the macro continues running as it should.
The run time error happens every time there is a new cost centre, and there are alot of them! The offending code seems to be the 2nd last line in:
While Cells(i, 1) <> ""
CC = Cells(i, 1)
Workbooks("causal tracksv2").Activate
Cells(1, 1).Select
ActiveCell.FormulaR1C1 = CC
Workbooks.Application.Calculate
Workbooks.Application.Calculate
Any help would be appreciated!
Thanks!