Tuesday, January 30, 2007

Calculate Options

Here's some tips for VBA calculating options that I posted on the forum

In the TM1 documentation you will find W_CALC which calculates a TM1 worksheet.

If you record a macro and do a F9 it will record it as "TM1RECALC" (bear in ming F9 calculates all worksheets in the workbook)

If you record a macro and do a SHIFT F9 it will record it as "TM1RECALC1" (SHIFT F9 calculates the active worksheet).

If your worksheet has TM1 formulas you are best using one of the above methods.

If you just want to calculate a lookup worksheet then you can use:

Thisworkbook.Sheets("SheetName").Calculate

If you just want to calculate a named range:

Range("MyRange").Calculate

Just the first 3 rows in the worksheet would be:

Activesheet.Range("1:3").Calculate