Whats the equivalent API for
Private Sub Worksheet_Change(ByVal Target As Range) in Open Office.
Running a macro when value of cell changes
Running a macro when value of cell changes
Open Office 4.1.3
Re: Running a macro when value of cell changes
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Running a macro when value of cell changes
It would be to see a specific case.
Here a possible example (without using "listeners").
For range A2:A30
Set it to the event of the sheet (Right click on the spreadsheet tab <> Sheet Events <> Content Changed ...)
Here a possible example (without using "listeners").
For range A2:A30
Code: Select all
Sub Worksheet_Change
rAdd = ThisComponent.getCurrentSelection.rangeAddress
If rAdd.startColumn = 0 Then
If rAdd.startRow < 30 And rAdd.endRow > 0 Then
MsgBox "Your Macro"
End If
End If
End Sub
lo 5.1.6.2 | aoo 4.1.3 | win 7/10
All I know is that I know nothing
All I know is that I know nothing
Re: Running a macro when value of cell changes
Here is an example you should prefer for use on Sheet-Event →→ Content changed
Code: Select all
Sub Content_change( changed_cell )
sheet = changed_cell.Spreadsheet
observed_range = sheet.getCellRangeByName("A2:A30")
if observed_range.queryIntersection( changed_cell.RangeAddress ).Count >0 then '# inside range of Interest#'
msgbox( changed_cell.AbsoluteName)
end if
end Sub
Libreoffice 7.4 on Debian 12 (Bookworm) (on RaspberryPI4)
Libreoffice 7.6 flatpak on Debian 12 (Bookworm) (on RaspberryPI4)