Hi,
I have a macro which hides a section of my spreadsheet. I’ve attached this macro to a custom toolbar so that with a press of the toolbar button it automatically closes (hide) some cells. However; my question is whether it is possible to have the cells open (show) again with the same button (macro)? Could someone answer whether this is possible? (Basically an if shown then hide ; if hidden then show)
Here is my current macro:
Sub HideToDo
dim oDoc as Object
dim oDisp as Object
dim oSheet as Object
oDoc = ThisComponent.CurrentController.Frame
oDisp = createUnoService(“com.sun.star.frame.DispatchHelper”)
oSheet = ThisComponent.CurrentController.ActiveSheet
dim pArgs(0) as new com.sun.star.beans.PropertyValue
pArgs(0).Name = “ToPoint”
pArgs(0).Value = “$E$1”
oDisp.executeDispatch(oDoc, “.uno:GoToCell”, “”, 0, pArgs())
oDisp.executeDispatch(oDoc, “.uno:HideColumn”, “”, 0, Array())
End Sub
Thanks so much!