Bonjour,
Tout d'abord merci de vos réponses, j'entrevois un début d'éclaircissement.
Ce qui m'a fait poser cette question, c'est ce petit bout de programme ci-dessous, qui semble-t-il vérifie si le contenu d'une cellule à changé, et ensuite prend les actions nécessaires au traitement.
J'imagine que "oEvt" fait appel à un genre de routine "Evénement", qu'ensuite "supportsService("com.sun.star.sheet.SheetCell")" identifie la partie de la "routine" à laquelle on fait appel.
"
Code : Tout sélectionner
Option VBASupport 1
option explicit
Sub PysOnChange(oEvt)
dim oPlage as object, oResult as object, oSheet as object, oCell as object
dim Tablo as variant
dim lRow as long, lCol as Long, i as long
if oEvt.supportsService("com.sun.star.sheet.SheetCell") then
oPlage = oEvt.spreadSheet.getCellRangeByname("K11:K25")
oResult = oEvt.queryIntersection(oPlage.RangeAddress)
If oResult.RangeAddressesAsString <> "" Then
oSheet = thiscomponent.currentController.ActiveSheet
lCol = oEvt.getCellAddress.column
lRow = oEvt.getCellAddress.row
Tablo = Sheets("liste adhérents").Range("A2:E201")
For i = LBound(Tablo, 1) To UBound(Tablo, 1)
If oEvt.formula = Tablo(i, 2) Then
oCell = oSheet.getCellByPosition(lCol -8, lRow)
oCell.formula = Tablo(i, 2)
oCell =oSheet.getCellByPosition(lCol -7, lRow)
oCell.formula = Tablo(i, 1)
oCell =oSheet.getCellByPosition(lCol -6, lRow)
oCell.formula = Tablo(i, 4)
oCell = oSheet.getCellByPosition(lCol -5, lRow)
oCell.formula = Tablo(i, 3)
Exit For
End If
Next i
end if
end if
End Sub
AOO4114m1(Build:9811) - Rev. a0d24fb625
2023-02-08 19:47
Windows 10