13 messages in org.openoffice.fr.progRE: [prog] Remplir un combo ooo2.01
FromSent OnAttachments
JovialJan 28, 2006 3:14 am 
BRONCHART PhilippeJan 30, 2006 11:26 am 
oo...@volcar.orgJan 30, 2006 12:57 pm 
BRONCHART PhilippeJan 30, 2006 2:05 pm 
Bernard MarcellyJan 31, 2006 12:10 am 
BRONCHART PhilippeFeb 6, 2006 4:41 am 
JovialFeb 6, 2006 12:39 pm 
Arnaud POUSSIERFeb 12, 2006 10:17 am 
Catherine BancillonFeb 13, 2006 1:50 am 
Catherine BancillonFeb 13, 2006 1:55 am 
Catherine BancillonFeb 13, 2006 2:02 am 
Didier Dorange-PattoretFeb 13, 2006 3:28 am 
BRONCHART PhilippeFeb 13, 2006 1:19 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:RE: [prog] Remplir un combo ooo2.01Actions...
From:BRONCHART Philippe (phil@laposte.net)
Date:Jan 30, 2006 2:05:08 pm
List:org.openoffice.fr.prog

Bonsoir

Non rien à faire

Variable objet non paramétrée ...

Comprends pas ...

-----Message d'origine----- De : oo@volcar.org [mailto:oo@volcar.org] Envoyé : lundi 30 janvier 2006 21:58 À : pr@fr.openoffice.org Objet : Re: [prog] Remplir un combo ooo2.01

Bonsoir,

Regarde cet exemple :

oCombo = oDialog.getControl("leCombo")

Do While oSheet.getCellByPosition(0, i).String <> "" 'oCombo.removeItems(i,oCombo.ItemCount)

oCombo.addItem(oSheet.getCellByPosition(0, i).String, i) i = i + 1 Loop

Selon BRONCHART Philippe <phil@laposte.net>:

Bonjour à tous

J’ai un souci avec mon code qui me revoit une erreur. Ce doit être un souci de variable, mais je ne comprends pas

Dim i As integer

Dim oSheets As Object

Dim combo as String

Odocument=ThisComponent

oSheet = oDocument.Sheets.getByName("Config")

bibli = DialogLibraries.GetByName("Standard")

monDialogue = bibli.GetByName("Dialog2")

Odialog = CreateUnoDialog(monDialogue)

‘ On alimente le combo avec la plage de cellule de la colonne A ( de la feuille config)

Do While oSheet.getCellByPosition(0, i).String <> "" ‘ tant que la cellule de la colonne A n’est pas vide

oDialog.getControl(Combo).additem(oSheet.getCellByPosition(0, i).String, oDialog.getControl(Combo).ItemCount) ‘ on alimente le combo

i = i + 1

Loop

End Sub

Une idée ?

Amicalement Philippe