Bonjour,
Je commence juste en macro libreoffice et je galère pas mal à trouver de la ressource pour mon cas.
Je souhaite donc faire un formulaire avec des listBox chargées via les plages nommées :
Une plage nommées : "fournisseur"
| *code*| *nom station*| *propriété*| *fournisseur_id*|
| station1| nom station 1| prop_stat_1| 1|
| station2| nom station 2| prop_stat_2| 1|
| station3| nom station 3| prop_stat_3| 2|
| station4| nom station 4| prop_stat_4| 2|
| station5| nom station 5| prop_stat_5| 3|
| station6| nom station 6| prop_stat_6| 3|
| station7| nom station 7| prop_stat_7| 4|
| station8| nom station 8| prop_stat_8| 5|
Une plage nommées : "station"
| *ID*| *nom*| *propriété*|
| 1| fourn1| propr1|
| 2| fourn2| propr2|
| 3| fourn3| propr3|
| 4| fourn4| propr4|
| 5| fourn5| propr5|
Et un formulaire :
http://imagik.fr/view-rl/127449
Lors du clic sur le fournisseur, je souhaite avoir les stations qui correspondent.
Pour le moment, je teste ce genre de chose pour exploiter les plages nommées, mais impossible de récupérer ces plages... :
Code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 Sub testPlage() Dim oPlage ' La plage nommée. Dim sNom$ ' Nom de la plage nommée à créer. Dim oCell ' Objet cellule. sNom$ = "fournisseur" oPlage = ThisComponent.NamedRanges.getByName(sNom$) oCell = oPlage.getElementNames() MsgBox oCell.getString() End Sub
Merci de votre aide
Partager