problème remplir une listebox avec écart [Résolu]

Signaler
Messages postés
3
Date d'inscription
dimanche 25 février 2007
Statut
Membre
Dernière intervention
27 février 2007
-
Messages postés
7668
Date d'inscription
samedi 5 novembre 2005
Statut
Membre
Dernière intervention
22 août 2014
-
bonjour à tous

Voilà mon problème j’ai deux textbox (text1 et text2) et je veux remplir une listbox(liste) en cliquant sur remplir.



<?xml:namespace prefix o ns "urn:schemas-microsoft-com:office:office" /??>
 






Principe

je rentre des chiffres (la textbox 2 doit être >  à la textbox 1).





J’entre 1  dans la textbox 1 et 5 dans la textbox 2 , je clique sur remplir, il doit s’afficher tout les chiffres de 1 à 5 compris (c'est-à-dire 1,2,3,4,5) dans la listebox.







autre exemple je tape 5 dans la textbox 1 et 10 dans ma textbox 2 je clique sur remplir
je dois avoir 5,6,7,8,9,10 dans ma listbox

voilà j'espère que quelqu'un peut m'aider 













<?xml:namespace prefix v ns "urn:schemas-microsoft-com:vml" /??>
<v:group id="_x0000_s1026" style="MARGIN-TOP: 253.15pt; Z-INDEX: 1; MARGIN-LEFT: 54.7pt; WIDTH: 441pt; POSITION: absolute; HEIGHT: 225pt" coordsize="7056,3600" coordorigin="2349,2727" editas="canvas">
<o:lock aspectratio="t" v:ext="edit">
</o:lock>
<v:shapetype id="_x0000_t75" coordsize="21600,21600" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75">
<v:stroke joinstyle="miter">
</v:stroke>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
</v:f>
<v:f eqn="sum @0 1 0">
</v:f>
<v:f eqn="sum 0 0 @1">
</v:f>
<v:f eqn="prod @2 1 2">
</v:f>
<v:f eqn="prod @3 21600 pixelWidth">
</v:f>
<v:f eqn="prod @3 21600 pixelHeight">
</v:f>
<v:f eqn="sum @0 0 1">
</v:f>
<v:f eqn="prod @6 1 2">
</v:f>
<v:f eqn="prod @7 21600 pixelWidth">
</v:f>
<v:f eqn="sum @8 21600 0">
</v:f>
<v:f eqn="prod @7 21600 pixelHeight">
</v:f>
<v:f eqn="sum @10 21600 0">
</v:f>
</v:formulas>
<v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f">
</v:path>
<o:lock aspectratio="t" v:ext="edit">
</o:lock>
</v:shapetype>
<v:shape id="_x0000_s1027" style="LEFT: 2349px; WIDTH: 7056px; POSITION: absolute; TOP: 2727px; HEIGHT: 3600px" filled="t" o:preferrelative="f" fillcolor="#ff9" type="#_x0000_t75">
<v:fill o:detectmouseclick="t">
</v:fill>
<v:path o:connecttype="none" o:extrusionok="t">
</v:path>
<o:lock v:ext="edit" text="t">
</o:lock>
</v:shape>
<v:shapetype id="_x0000_t202" coordsize="21600,21600" path="m,l,21600r21600,l21600,xe" o:spt="202">
<v:stroke joinstyle="miter">
</v:stroke>
<v:path o:connecttype="rect" gradientshapeok="t">
</v:path>
</v:shapetype>
<v:shape id="_x0000_s1028" style="LEFT: 4941px; WIDTH: 1152px; POSITION: absolute; TOP: 3015px; HEIGHT: 576px" type="#_x0000_t202">
<v:textbox>
  remplir

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1029" style="LEFT: 5661px; WIDTH: 432px; POSITION: absolute; TOP: 3879px; HEIGHT: 432px" type="#_x0000_t202">
<v:textbox>
1

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1030" style="LEFT: 5661px; WIDTH: 432px; POSITION: absolute; TOP: 4455px; HEIGHT: 432px" type="#_x0000_t202">
<v:textbox>
5

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1031" style="LEFT: 4941px; WIDTH: 576px; POSITION: absolute; TOP: 3879px; HEIGHT: 432px" type="#_x0000_t202">
<v:textbox>
min

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1032" style="LEFT: 4941px; WIDTH: 576px; POSITION: absolute; TOP: 4455px; HEIGHT: 432px" type="#_x0000_t202">
<v:textbox>
maxi

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1033" style="LEFT: 6381px; WIDTH: 576px; POSITION: absolute; TOP: 3015px; HEIGHT: 1872px" type="#_x0000_t202">
<v:textbox>
  1

  2

  3

  4

  5

</v:textbox>
</v:shape>
<v:line id="_x0000_s1034" style="POSITION: absolute; flip: x" to="5805,5751" from="5373,4887">
</v:line>
<v:line id="_x0000_s1035" style="POSITION: absolute; flip: x" to="5805,5751" from="5373,4311">
</v:line>
<v:shape id="_x0000_s1036" style="LEFT: 4797px; WIDTH: 3168px; POSITION: absolute; TOP: 5751px; HEIGHT: 432px" type="#_x0000_t202" strokecolor="green">
<v:textbox>
Textbox 1 (chiffre 1) et 2 (chiffre 5)

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1037" style="LEFT: 8109px; WIDTH: 1008px; POSITION: absolute; TOP: 3879px; HEIGHT: 432px" type="#_x0000_t202" strokecolor="fuchsia">
<v:textbox>
listbox


</v:textbox>
</v:shape>
<v:rect id="_x0000_s1038" style="LEFT: 6381px; WIDTH: 144px; POSITION: absolute; TOP: 3159px; HEIGHT: 144px">
</v:rect>
<v:rect id="_x0000_s1039" style="LEFT: 6381px; WIDTH: 144px; POSITION: absolute; TOP: 3303px; HEIGHT: 144px">
</v:rect>
<v:rect id="_x0000_s1040" style="LEFT: 6381px; WIDTH: 144px; POSITION: absolute; TOP: 3591px; HEIGHT: 144px">
</v:rect>
<v:rect id="_x0000_s1041" style="LEFT: 6381px; WIDTH: 144px; POSITION: absolute; TOP: 3735px; HEIGHT: 144px">
</v:rect>
<v:rect id="_x0000_s1042" style="LEFT: 6381px; WIDTH: 144px; POSITION: absolute; TOP: 4023px; HEIGHT: 144px">
</v:rect>
<v:line id="_x0000_s1043" style="POSITION: absolute; flip: x y" to="8109,4167" from="6957,4023">
</v:line>
<v:line id="_x0000_s1044" style="POSITION: absolute; flip: x" to="4941,3303" from="4077,3303">
</v:line>
<v:shape id="_x0000_s1045" style="LEFT: 2493px; WIDTH: 1584px; POSITION: absolute; TOP: 3015px; HEIGHT: 576px" type="#_x0000_t202" strokecolor="blue">
<v:textbox>
Command remplir la listbox

</v:textbox>
</v:shape>
<?xml:namespace prefix w ns "urn:schemas-microsoft-com:office:word" /??>
<w:wrap type="square">
</w:wrap>
</v:group>


<v:group id="_x0000_s1026" style="MARGIN-TOP: 253.15pt; Z-INDEX: 1; MARGIN-LEFT: 54.7pt; WIDTH: 441pt; POSITION: absolute; HEIGHT: 225pt" coordsize="7056,3600" coordorigin="2349,2727" editas="canvas">
<o:lock aspectratio="t" v:ext="edit">
</o:lock>
<v:shapetype id="_x0000_t75" coordsize="21600,21600" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75">
<v:stroke joinstyle="miter">
</v:stroke>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
</v:f>
<v:f eqn="sum @0 1 0">
</v:f>
<v:f eqn="sum 0 0 @1">
</v:f>
<v:f eqn="prod @2 1 2">
</v:f>
<v:f eqn="prod @3 21600 pixelWidth">
</v:f>
<v:f eqn="prod @3 21600 pixelHeight">
</v:f>
<v:f eqn="sum @0 0 1">
</v:f>
<v:f eqn="prod @6 1 2">
</v:f>
<v:f eqn="prod @7 21600 pixelWidth">
</v:f>
<v:f eqn="sum @8 21600 0">
</v:f>
<v:f eqn="prod @7 21600 pixelHeight">
</v:f>
<v:f eqn="sum @10 21600 0">
</v:f>
</v:formulas>
<v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f">
</v:path>
<o:lock aspectratio="t" v:ext="edit">
</o:lock>
</v:shapetype>
<v:shape id="_x0000_s1027" style="LEFT: 2349px; WIDTH: 7056px; POSITION: absolute; TOP: 2727px; HEIGHT: 3600px" filled="t" o:preferrelative="f" fillcolor="#ff9" type="#_x0000_t75">
<v:fill o:detectmouseclick="t">
</v:fill>
<v:path o:connecttype="none" o:extrusionok="t">
</v:path>
<o:lock v:ext="edit" text="t">
</o:lock>
</v:shape>
<v:shapetype id="_x0000_t202" coordsize="21600,21600" path="m,l,21600r21600,l21600,xe" o:spt="202">
<v:stroke joinstyle="miter">
</v:stroke>
<v:path o:connecttype="rect" gradientshapeok="t">
</v:path>
</v:shapetype>
<v:shape id="_x0000_s1028" style="LEFT: 4941px; WIDTH: 1152px; POSITION: absolute; TOP: 3015px; HEIGHT: 576px" type="#_x0000_t202">
<v:textbox>
  remplir

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1029" style="LEFT: 5661px; WIDTH: 432px; POSITION: absolute; TOP: 3879px; HEIGHT: 432px" type="#_x0000_t202">
<v:textbox>
1

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1030" style="LEFT: 5661px; WIDTH: 432px; POSITION: absolute; TOP: 4455px; HEIGHT: 432px" type="#_x0000_t202">
<v:textbox>
5

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1031" style="LEFT: 4941px; WIDTH: 576px; POSITION: absolute; TOP: 3879px; HEIGHT: 432px" type="#_x0000_t202">
<v:textbox>
min

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1032" style="LEFT: 4941px; WIDTH: 576px; POSITION: absolute; TOP: 4455px; HEIGHT: 432px" type="#_x0000_t202">
<v:textbox>
maxi

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1033" style="LEFT: 6381px; WIDTH: 576px; POSITION: absolute; TOP: 3015px; HEIGHT: 1872px" type="#_x0000_t202">
<v:textbox>
  1

  2

  3

  4

  5

</v:textbox>
</v:shape>
<v:line id="_x0000_s1034" style="POSITION: absolute; flip: x" to="5805,5751" from="5373,4887">
</v:line>
<v:line id="_x0000_s1035" style="POSITION: absolute; flip: x" to="5805,5751" from="5373,4311">
</v:line>
<v:shape id="_x0000_s1036" style="LEFT: 4797px; WIDTH: 3168px; POSITION: absolute; TOP: 5751px; HEIGHT: 432px" type="#_x0000_t202" strokecolor="green">
<v:textbox>
Textbox 1 (chiffre 1) et 2 (chiffre 5)

</v:textbox>
</v:shape>
<v:shape id="_x0000_s1037" style="LEFT: 8109px; WIDTH: 1008px; POSITION: absolute; TOP: 3879px; HEIGHT: 432px" type="#_x0000_t202" strokecolor="fuchsia">
<v:textbox>
listbox


</v:textbox>
</v:shape>
<v:rect id="_x0000_s1038" style="LEFT: 6381px; WIDTH: 144px; POSITION: absolute; TOP: 3159px; HEIGHT: 144px">
</v:rect>
<v:rect id="_x0000_s1039" style="LEFT: 6381px; WIDTH: 144px; POSITION: absolute; TOP: 3303px; HEIGHT: 144px">
</v:rect>
<v:rect id="_x0000_s1040" style="LEFT: 6381px; WIDTH: 144px; POSITION: absolute; TOP: 3591px; HEIGHT: 144px">
</v:rect>
<v:rect id="_x0000_s1041" style="LEFT: 6381px; WIDTH: 144px; POSITION: absolute; TOP: 3735px; HEIGHT: 144px">
</v:rect>
<v:rect id="_x0000_s1042" style="LEFT: 6381px; WIDTH: 144px; POSITION: absolute; TOP: 4023px; HEIGHT: 144px">
</v:rect>
<v:line id="_x0000_s1043" style="POSITION: absolute; flip: x y" to="8109,4167" from="6957,4023">
</v:line>
<v:line id="_x0000_s1044" style="POSITION: absolute; flip: x" to="4941,3303" from="4077,3303">
</v:line>
<v:shape id="_x0000_s1045" style="LEFT: 2493px; WIDTH: 1584px; POSITION: absolute; TOP: 3015px; HEIGHT: 576px" type="#_x0000_t202" strokecolor="blue">
<v:textbox>
Command remplir la listbox

</v:textbox>
</v:shape>
<w:wrap type="square">
</w:wrap>
</v:group>



<li>

 

</li>

1 réponse

Messages postés
7668
Date d'inscription
samedi 5 novembre 2005
Statut
Membre
Dernière intervention
22 août 2014
24
Bonsoir,

Pour lister les chiffres entre les 2 bornes, il te suffit de faire une boucle.

Exemple :

For i = Val(text1.text) to Val(text2.text)
  msgbox i
next

Pour ajouter un article à une listbox :

List1.additem ce_que_tu_veux_ajouter

Tu as là tous les éléments qu'il te faut pour y aller.