Code: Alles auswählen
sub Jump_to_Table
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
osheet=thisComponent.sheets(0)
ocell=osheet.getcellrangebyname("L1")
oTable=ocell.value 'Wert aus L1 auslesen
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 = "Nr"
args1(0).Value = oTable'Wert aus L1 verwenden
dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args1())
end sub
Code: Alles auswählen
Sub Jump_to_Table
otable = thiscomponent.sheets(0).getcellrangebyname("L1").value
thiscomponent.currentcontroller.ActiveSheet = thiscomponent.sheets(otable-1)
End Sub