How to get the name of checkbox that I checked in libreoffice calc (macro)? -
i have more 40 check-boxes in single calc sheet, , don't want code each 1 of them. want clear working code get name of checkbox.
in program have manually type name check-box within macro code:
a="checkbox1" this have far:
sub marco1 dim ocheckbox1 dim oform dim a="checkbox1" oform = thiscomponent.sheets(0).drawpage.forms.getbyindex(0) ocheckbox1 = oform.getbyname(a) if ocheckbox1.state = "0" if msgbox ("are sure ?note: can't re-edited", 292) = 6 ocheckbox1.label = "checked" ocheckbox1.enabled="false" else ocheckbox1.label = "not checked" end if end if end sub
assuming macro triggered interaction checkbox:
sub macro1 (oevent object) dim ocheckbox1 object dim scheckbox1name string ocheckbox1 = oevent.source.model scheckbox1name = ocheckbox1.name end sub
Comments
Post a Comment