Good evening
I’m learning the basics and triggers.
So a macro on a content change event on a sheet that searches for the row or line and the content of the first column to display it in a message.
it works fine except that when I click on another cell, which triggers the event, moving the mouse or the pad to the dialog box and clicking ok or cancel creates an unwanted selection.
how to avoid this behavior please?
oh to clarify,
the phenomenon of selection enlargement only occurs when the cursor is above the dialog box
the macro
REM ***** BASIC *****
Sub Macro1(oevt)
if oevt.supportsService("com.sun.star.table.Cell") then
rem get access to the document
oCC = Thiscomponent.CurrentController
r = oevt.CellAddress.Row
oCell = oevt.SpreadSheet.getCellByPosition(0,r)
oCellVal = oevt.SpreadSheet.getCellByPosition(0,r).String
MsgBox("row : " + r + ", " + "valeur A0 : " + oCellVal,1,"dialog box")
End if
End Sub
essaiBasic2_V1.ods (8.9 KB)