Recalculate a report
All the recalculate options described in this section only recalculate DataLink Server Queries. To recalculate Microsoft® Office Excel based formulas, additional steps must be added to the macro as DataLink Server does not force Excel to move to Manual Calculation methods.
Recalculate workbook
To create a macro that recalculates an entire workbook, add this method in to your macro:
Sub RecalculateWorkbook() QAAmacro.Recalculate End Sub
This will recalculate all DataLink Server Queries in that Workbook.
Recalculate worksheet
To create a macro that recalculates a particular worksheet, add this method in to your macro:
Sub RecalculateWorksheet() QAAMacro.RecalculateWorksheet ("SheetName") End Sub
This will recalculate all DataLink Server Queries in the specified Worksheet.
Recalculate range
To create a macro that recalculates a specific range of the active Workbook, add this method in to your macro:
Sub RecalculateRange() QAAMacro.RecalculateRange "A10:G45" End Sub
Or a specific cell:
Sub RecalculateRange() QAAMacro.RecalculateRange "H12" End Sub
The recalculate range only recalculates the active Worksheet. To
recalculate a Worksheet that is not active, you cannot precede the formula with
a Worksheet name such as
sheet2!E17:C13
as the sheet name is ignored.
Therefore, you must call Excels standard macro function
sheets("SheetName").Select
before adding a step to
recalculate the range.