Libre 6 on Bionic Bunny I found the following code snippet on an OO forum but cant seem to make it work on LO Can somebody “translate” it into LO Basic
Function Hide_Named_CheckBox(ChkCondition as integer, ChkBoxName as string) as string
Dim oDoc As Object
Dim oSheet As Object
Dim oDrawPage As Object
Dim oForm As Object
Dim oControl_1 As Object
oDoc = ThisComponent
oSheet = oDoc.GetCurrentController.Activesheet
oDrawPage = oSheet.DrawPage
oForm = oDrawPage.getForms().getByIndex(0)
oControl = oForm.getByName(ChkBoxName)
if ChkCondition = 1 then
oControl.EnableVisible = false
Hide_Named_CheckBox = "Invisible"
else
oControl.EnableVisible = true
Hide_Named_CheckBox = "Visible"
end if
end function