[Solved] Start stop Auto-Calc of a table by my macro?

Creating a macro - Writing a Script - Using the API

[Solved] Start stop Auto-Calc of a table by my macro?

Postby goooly » Sat Nov 07, 2009 1:36 pm

Hi,

is ist possible to stop AutoCalc (in german: Extras => Zellinhalte => Automatisch berechnen
which is somewhat equivalent to: Tools => Cell contents => Auto calc ??)
when a macro is started and switched on again after all cell are 'filled'
and switched off again so that all the copying of the cell content to keep the values
does not start a neeedles and sensless recalc of the table??

Could find anything neither in the help nor by google,
inly Excel code:
Code: Select all   Expand viewCollapse view
Sub Refresh
   ThisWorkbook.Sheets("Summary").EnableCalculation = True
   ThisWorkbook.Sheets("Summary").EnableCalculation = False
End Sub

that I changed to
Code: Select all   Expand viewCollapse view
...
mDOC = ThisComponent
...
Sub Refresh
   MsgBox "AutoCalc - on :",0
   mDOC.EnableCalculation = True
   MsgBox "AutoCalc - off:",0
   mDOC.EnableCalculation = False
End Sub


Does OO-Basic provides this Option?
Anybody with an idea - workaround?
Thanks and a nice weekend,
Gooly
Last edited by goooly on Sat Nov 07, 2009 10:03 pm, edited 2 times in total.
OOo 3.1.X on MS Windows Vista + Linux
goooly
 
Posts: 10
Joined: Mon Jul 20, 2009 5:08 pm

Re: start stop Auto-Calc of a table by my macro?

Postby FJCC » Sat Nov 07, 2009 5:29 pm

The method in Calc is called enableAutomaticCalculation.
Code: Select all   Expand viewCollapse view
oDoc = ThisComponent
oDoc.enableAutomaticCalculation(False)
OOo 3.1.X on Ms Windows XP
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Volunteer
 
Posts: 888
Joined: Sat Nov 08, 2008 8:08 pm

Re: start stop Auto-Calc of a table by my macro?

Postby goooly » Sat Nov 07, 2009 9:53 pm

yupp, Thanks, and
oDoc.Calculate
is as I were pressing F9
(for others having the same problem)
Bye
OOo 3.1.X on MS Windows Vista + Linux
goooly
 
Posts: 10
Joined: Mon Jul 20, 2009 5:08 pm


Return to Macros and UNO API

Who is online

Users browsing this forum: MSN [Bot] and 2 guests