On 10/22/2013 01:35 AM, Heena Gupta wrote:
Hi guys,

  When i run the MS Excel macro in libre office, it runs correctly but shows
the output while clicking on the cell on which output comes.


Option VBASupport 1
Sub Button1_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Range("B1").Select
a = ActiveCell.Text
Range("B3").Select
b = ActiveCell.Text
c = a + b
Range("B8").Select
ActiveCell.FormulaR1C1 = c
End Sub

Thanks & Regards,
  Heena Gupta

Are you saying that the screen updates while your macro runs?

To quote Bernard Marcelly: (see http://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=42396)

Freezing screen is done with method lockControllers() of the document's Model.
Freezing recalculations is done with method addActionLock() of the document.
With Basic it's simple:

|myDoc = ThisComponent
myDoc.lockControllers()
myDoc.addActionLock()
' --- modify your cells here ---
myDoc.removeActionLock()
myDoc.unlockControllers()|

If you are asking what I think you are asking, you would only lock and unlock the controller and not use the action lock.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


--
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to