Pb Onglets

Vivolenantais Messages postés 48 Date d'inscription dimanche 19 décembre 2004 Statut Membre Dernière intervention 12 octobre 2005 - 2 mars 2005 à 15:23
cs_max68 Messages postés 30 Date d'inscription samedi 13 mars 2004 Statut Membre Dernière intervention 20 juin 2008 - 2 mars 2005 à 15:48
Pour utiliser des onglets, j'ai pris Tab Options. Le problème, c'est que même avec le code qui je pense est bon, le dernier onglet ne marche pas, alor que les 3 premiers m'affiche les données. Voila ce que ça met comme erreur "L'élément du groupe de contrôle 4 n'existe pas".
Voila mon code, si quelqu'un arrive à trouver les erreurs :

Private Sub tabOptions_Click()
fraContain(0) = lblInfo
fraContain(0) = lblName
fraContain(0) = txtName
fraContain(0) = lblAdress
fraContain(0) = txtAdress
fraContain(0) = lblCity
fraContain(0) = txtCity
fraContain(0) = lblCode
fraContain(0) = txtCode
fraContain(0) = lblDate
fraContain(0) = txtDate
fraContain(0) = lblSize
fraContain(0) = optSize1
fraContain(0) = optSize2
fraContain(0) = optSize3
fraContain(0) = optSize4
fraContain(0) = lblStaff1
fraContain(0) = lblStaff2
fraContain(0) = lblStaff3
fraContain(0) = lblStaff4
fraContain(0) = lblType
fraContain(0) = optType1
fraContain(0) = optType2
fraContain(0) = optType3
fraContain(0) = optType4
fraContain(0) = lblStatut1
fraContain(0) = lblStatut2
fraContain(0) = lblStatut3
fraContain(0) = lblStatut4
fraContain(0) = lblSector
fraContain(0) = chkSector1
fraContain(0) = chkSector2
fraContain(0) = chkSector3
fraContain(0) = lblPrimary
fraContain(0) = lblSecondary
fraContain(0) = lblTertiary
fraContain(1) = lblWorker
'fraContain(1) = dgdWorker
'fraContain(1) = adoWorker
fraContain(2) = lblFunction
'fraContain(2) = dgdFunction
'fraContain(2) = adoFunction
'fraContain(3) = cmdQuitter
If tabOptions.SelectedItem.Index <> intCurFrame Then
fraContain(tabOptions.SelectedItem.Index).Visible = False
fraContain(intCurFrame).Visible = True
intCurFrame = tabOptions.SelectedItem.Index 'Affecte la nouvelle valeur à intCurFrame
End If
End Sub

Voilà, merci de m'aider

1 réponse

cs_max68 Messages postés 30 Date d'inscription samedi 13 mars 2004 Statut Membre Dernière intervention 20 juin 2008
2 mars 2005 à 15:48
Salut,

Il y a ptete un problème au niveau des index, car avec tes fracontain, tu commences à 0, alors que peut être ton tabOptions commence à 1. Faut vérifier en pas à pas.

Voila
0
Rejoignez-nous