Hi! I have started to use Macros in Calc. I get a failure message during the compiling which I cannot solve. Any sugestions (I know it will be a stupid one…): The macro was recorded and not changed. The last line is marked by the compiler with this message: “BASIC syntax error. Expected: Sub”
2025-01-05T23:00:00Z.
EM ***** BASIC *****
Sub Master
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService(“com.sun.star.frame.DispatchHelper”)
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = “ToPoint”
args1(0).Value = “$F$7”
dispatcher.executeDispatch(document, “.uno:GoToCell”, “”, 0, args1())
End Sub