how to disable screen updating while running a macro in Calc?

I’m running a macro that parses data out of a rather lengthy spreadsheet.
Is there a way to disable the screen from updating until the macro is finished?
This might help speed up the macro.

Examples shown elsewhere say to use

thisComponent.lockControllers
thisComponent.enableAutomaticCalculation(false)

but this does not work on my LibreOffice Version: 6.0.2.1 (x64).

rem ----------------------------------------------------------------------
sub CollectTimeThree
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
dim i
dim args1(0) as new com.sun.star.beans.PropertyValue

rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem disable screen updating and disable recalculation
thisComponent.lockControllers
thisComponent.enableAutomaticCalculation(false)

For i = 1 To 150

rem bunch of code here

Next i

rem enable screen updating and enable recalculation
thisComponent.enableAutomaticCalculation(true)
thisComponent.calculateAll
thisComponent.unlockControllers

end sub

Have you tried following the sample to the letter, creating a new variable like oDoc=thisComponent, and then doing lockControllers/unlockControllers on that variable?

When you are new to something, first please follow the advises closely.

http://lmgtfy.com/?s=d&q=how+to+disable+screen+updating+while+running+a+macro+in+Calc%3F

outside my for loop, I added this code:

rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
document.lockController()
document.addActionLock()

is getting me an error:

BASIC runtime error.
Property or method not found: lockController.

Sigh, reading is hard.

The first solution returned by the search above tells about

myDoc = ThisComponent
myDoc.lockControllers()

(see s at the end of lockControllers),
but not about ThisComponent.CurrentController.Frame.lockController()

I used the following code, and it worked fine:

Dim Doc As Object

Doc = ThisComponent

doc.lockcontrollers

See LibreOffice: XModel Interface Reference.
And regard:

The calls to XModel::lockControllers() and XModel::unlockControllers() may be nested and even overlapping, but they must be in pairs. While there is at least one lock remaining, some notifications for display updates are not broadcasted.