begin process at 2008 08 29 19:22:39
1 233 841 membres
365 nouveaux aujourd'hui
14 294 membres club

Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

Sujet : Modifier le Caption des boutons à la volée [ Archives Visual Basic / VBA ] (Baboune1)

Modifier le Caption des boutons à la volée le 17/03/2002 21:11:06

Baboune1
Boujour,
Comment peut on simplifier ceci en VBA Excel :

FormCalendrier.Bouton1.Caption = Calendar(1, 1)
FormCalendrier.Bouton2.Caption = Calendar(1, 2)
FormCalendrier.Bouton3.Caption = Calendar(1, 3)
FormCalendrier.Bouton4.Caption = Calendar(1, 4)
FormCalendrier.Bouton5.Caption = Calendar(1, 5)
FormCalendrier.Bouton6.Caption = Calendar(1, 6)
FormCalendrier.Bouton7.Caption = Calendar(1, 7)
FormCalendrier.Bouton8.Caption = Calendar(2, 1)
FormCalendrier.Bouton9.Caption = Calendar(2, 2)
FormCalendrier.Bouton10.Caption = Calendar(2, 3)
FormCalendrier.Bouton11.Caption = Calendar(2, 4)
FormCalendrier.Bouton12.Caption = Calendar(2, 5)
FormCalendrier.Bouton13.Caption = Calendar(2, 6)
FormCalendrier.Bouton14.Caption = Calendar(2, 7)

FormCalendrier.Bouton X.Caption= Calendar(Y, Z)
ne fonctionne pas !
Merci de votre aide.

Re : Modifier le Caption des boutons à la volée le 25/03/2002 19:34:33

Didiboy
il faut moins de lignes !
deja il faut ke ton tableau soit de type string
ensuite, pour tes boutons,fait des groupe !
(il auront un index)
ca devrait ressembler à ca :
dim i,j,k as integer
k=0
for j=1 to 2
For i=1 to 7
k=k+1
FormCalendrier.Bouton(k).Caption = Calendar(j, i)
next i
next j

-------------------------------
Réponse au message :
-------------------------------

Boujour,
Comment peut on simplifier ceci en VBA Excel :

FormCalendrier.Bouton1.Caption = Calendar(1, 1)
FormCalendrier.Bouton2.Caption = Calendar(1, 2)
FormCalendrier.Bouton3.Caption = Calendar(1, 3)
FormCalendrier.Bouton4.Caption = Calendar(1, 4)
FormCalendrier.Bouton5.Caption = Calendar(1, 5)
FormCalendrier.Bouton6.Caption = Calendar(1, 6)
FormCalendrier.Bouton7.Caption = Calendar(1, 7)
FormCalendrier.Bouton8.Caption = Calendar(2, 1)
FormCalendrier.Bouton9.Caption = Calendar(2, 2)
FormCalendrier.Bouton10.Caption = Calendar(2, 3)
FormCalendrier.Bouton11.Caption = Calendar(2, 4)
FormCalendrier.Bouton12.Caption = Calendar(2, 5)
FormCalendrier.Bouton13.Caption = Calendar(2, 6)
FormCalendrier.Bouton14.Caption = Calendar(2, 7)

FormCalendrier.Bouton X.Caption= Calendar(Y, Z)
ne fonctionne pas !
Merci de votre aide.


Classé sous : boutons, caption, modifier, calendar, formcalendrier

Participer à cet échange

Pub



Appels d'offres

Recherche developpeur ...
Budget : 700€
SITE MARCHAND LOCATION...
Budget : 3 000€
SITE MARCHAND POUR HOTEL
Budget : 4 000€

CalendriCode

Août 2008
LMMJVSD
    123
45678910
11121314151617
18192021222324
25262728293031

Téléchargements

Boutique

Boutique de goodies CodeS-SourceS