Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" & Num -
1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" & Num -
1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" & Num -
1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" &
Num -
1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" &
Num -
1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" &
Num -
1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Salut,
Premièrement, les boucles concernant ton tableau devraient commencer à 0
pour tout inclure.
Évite aussi de mettre des On Error Resume Next, à moins d'être certaine de
ce qui se passe.
Pour ton problème, l'erreur 13 survient en général lorsqu'il y a
incompatibilité de type entre 2 variables ou entre une valeur et l'endroit
où tu veux la mettre (ex: mettre une String dans un Integer)
Pour faciliter la recherche de l'erreur, place au début de chaque
procédure
louche
On Error Goto Erreur
Et à la fin avant le End Sub, tu mets
Exit Sub
Erreur:
Stop
Resume
En roulant le programme, l'erreur sera rencontrée et le programme arrêtera
sur le STOP.
À ce moment, tu fais F8 2 fois (pas à pas) et tu pourras cibler la ligne
qui fait défaut.
Si tu passes la souris au-dessus des variables (ou valeur de Range) qui
sont
sur cette ligne, tu devrais pouvoir trouver l'erreur et essayer de la
contrer.
Une fois le problème réglé, tu pourra mettre en commentaire ou effacer les
STOP et RESUME
Michel
"Linebaker" a écrit dans le message de
news:BqtKe.77784$Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" &
Num -1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Salut,
Premièrement, les boucles concernant ton tableau devraient commencer à 0
pour tout inclure.
Évite aussi de mettre des On Error Resume Next, à moins d'être certaine de
ce qui se passe.
Pour ton problème, l'erreur 13 survient en général lorsqu'il y a
incompatibilité de type entre 2 variables ou entre une valeur et l'endroit
où tu veux la mettre (ex: mettre une String dans un Integer)
Pour faciliter la recherche de l'erreur, place au début de chaque
procédure
louche
On Error Goto Erreur
Et à la fin avant le End Sub, tu mets
Exit Sub
Erreur:
Stop
Resume
En roulant le programme, l'erreur sera rencontrée et le programme arrêtera
sur le STOP.
À ce moment, tu fais F8 2 fois (pas à pas) et tu pourras cibler la ligne
qui fait défaut.
Si tu passes la souris au-dessus des variables (ou valeur de Range) qui
sont
sur cette ligne, tu devrais pouvoir trouver l'erreur et essayer de la
contrer.
Une fois le problème réglé, tu pourra mettre en commentaire ou effacer les
STOP et RESUME
Michel
"Linebaker" <tryagain@hotmail.com> a écrit dans le message de
news:BqtKe.77784$Z52.434515@wagner.videotron.net...
Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" &
Num -
1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Salut,
Premièrement, les boucles concernant ton tableau devraient commencer à 0
pour tout inclure.
Évite aussi de mettre des On Error Resume Next, à moins d'être certaine de
ce qui se passe.
Pour ton problème, l'erreur 13 survient en général lorsqu'il y a
incompatibilité de type entre 2 variables ou entre une valeur et l'endroit
où tu veux la mettre (ex: mettre une String dans un Integer)
Pour faciliter la recherche de l'erreur, place au début de chaque
procédure
louche
On Error Goto Erreur
Et à la fin avant le End Sub, tu mets
Exit Sub
Erreur:
Stop
Resume
En roulant le programme, l'erreur sera rencontrée et le programme arrêtera
sur le STOP.
À ce moment, tu fais F8 2 fois (pas à pas) et tu pourras cibler la ligne
qui fait défaut.
Si tu passes la souris au-dessus des variables (ou valeur de Range) qui
sont
sur cette ligne, tu devrais pouvoir trouver l'erreur et essayer de la
contrer.
Une fois le problème réglé, tu pourra mettre en commentaire ou effacer les
STOP et RESUME
Michel
"Linebaker" a écrit dans le message de
news:BqtKe.77784$Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" &
Num -1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" & Num -
1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" & Num -
1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" & Num -
1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Bonjour LSteph et MPi,
MPi, pourtant ma variable L as Integer se retrouve seulement dans une
boucle.
Tel qu'indiqué l'erreur 13 se trouve dans cette boucle :
For L = 1 To UBound(tabtemp, 1) 'L'ERREUR 13 EST ICI
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
LSteph, j'ai remplacé la ligne de code ColBase1.Add TabPlage(i, 1),
Cstr(TabPlage(i, 1))
tel que suggéré. Résultat : c'est la colonne A qui se retrouve dans les 3
combobox.
Merci
Bonjour LSteph et MPi,
MPi, pourtant ma variable L as Integer se retrouve seulement dans une
boucle.
Tel qu'indiqué l'erreur 13 se trouve dans cette boucle :
For L = 1 To UBound(tabtemp, 1) 'L'ERREUR 13 EST ICI
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
LSteph, j'ai remplacé la ligne de code ColBase1.Add TabPlage(i, 1),
Cstr(TabPlage(i, 1))
tel que suggéré. Résultat : c'est la colonne A qui se retrouve dans les 3
combobox.
Merci
Bonjour LSteph et MPi,
MPi, pourtant ma variable L as Integer se retrouve seulement dans une
boucle.
Tel qu'indiqué l'erreur 13 se trouve dans cette boucle :
For L = 1 To UBound(tabtemp, 1) 'L'ERREUR 13 EST ICI
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
LSteph, j'ai remplacé la ligne de code ColBase1.Add TabPlage(i, 1),
Cstr(TabPlage(i, 1))
tel que suggéré. Résultat : c'est la colonne A qui se retrouve dans les 3
combobox.
Merci
tabtemp = .Range("A2:K" & L).Value
Effectivement , j'avais zappé le commentaire ....
Ubound renvoie un Long alors que tu as définit L comme Integer..
essaie L as Long
a+
lSteph
"Linebaker" a écrit dans le message de news:
BqtKe.77784$Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" &
Num - 1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
tabtemp = .Range("A2:K" & L).Value
Effectivement , j'avais zappé le commentaire ....
Ubound renvoie un Long alors que tu as définit L comme Integer..
essaie L as Long
a+
lSteph
"Linebaker" <tryagain@hotmail.com> a écrit dans le message de news:
BqtKe.77784$Z52.434515@wagner.videotron.net...
Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" &
Num - 1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
tabtemp = .Range("A2:K" & L).Value
Effectivement , j'avais zappé le commentaire ....
Ubound renvoie un Long alors que tu as définit L comme Integer..
essaie L as Long
a+
lSteph
"Linebaker" a écrit dans le message de news:
BqtKe.77784$Bonjour à vous tous,
Dans le code qui suit, j'ai une erreur que je ne sais comment corriger.
Est-ce que quelqu'un peut m'aider ?
Option Explicit
Option Compare Text
Private TabPlage As Variant
Private Sub UserForm_Initialize()
Dim i As Integer
Dim ColBase1 As New Collection
Dim Item As Variant
Dim X As Byte
For X = 1 To 3
Me.Controls("ComboBox" & X).Style = fmStyleDropDownList
Next
With Sheets("Feuil1")
TabPlage = .Range("A2:C" & .Range("A65536").End(xlUp).Row)
End With
On Error Resume Next
For i = 1 To UBound(TabPlage)
ColBase1.Add TabPlage(i, 1), TabPlage(i, 1)
Next
On Error GoTo 0
For Each Item In ColBase1
Me.ComboBox1.AddItem Item
Next
End Sub
Private Sub ComboBox1_Change()
ComboBoxing 2
End Sub
Private Sub ComboBox2_Change()
ComboBoxing 3
End Sub
Private Sub ComboBox3_Change()
Dim L As Integer
Dim tabtemp As Variant
With Worksheets("Feuil1")
L = .Range("a15000").End(xlUp).Row
tabtemp = .Range("A2:K" & L).Value
End With
For L = 1 To UBound(tabtemp, 1) 'l'erreur 13 se trouve ici
If tabtemp(L, 1) = CLng(ComboBox3.Value) Then
ListBox1.AddItem tabtemp(L, 1)
ListBox2.AddItem tabtemp(L, 2)
ListBox3.AddItem tabtemp(L, 3)
ListBox4.AddItem tabtemp(L, 4)
ListBox5.AddItem tabtemp(L, 8)
ListBox6.AddItem tabtemp(L, 6)
ListBox7.AddItem tabtemp(L, 7)
ListBox8.AddItem tabtemp(L, 5)
End If
Next L
End Sub
Private Sub ComboBoxing(Num As Byte)
Dim i As Integer
Dim ColBaseX As New Collection
Dim Item As Variant
Dim X As Byte
For X = Num To 3
Me.Controls("ComboBox" & X).Clear
Next
On Error Resume Next
For i = 1 To UBound(TabPlage)
If CStr(TabPlage(i, Num - 1)) = CStr(Me.Controls("ComboBox" &
Num - 1)) Then
ColBaseX.Add TabPlage(i, Num), CStr(TabPlage(i, Num))
End If
Next
On Error GoTo 0
For Each Item In ColBaseX
Me.Controls("ComboBox" & Num).AddItem Item
Next
End Sub
Merci
Bonsoir Michel,
Avant de faire ma demande sur le groupe, j'avais déjà fait le pas à pas
pour
trouver l'erreur. J'ai tout de même fait ce que tu m'as dit et je n'ai pas
plus d'information à donner que mon précédent message à savoir l'endroit
de
l'erreur qui se trouve à la ligne suivante : For L = 1 To UBound(tabtemp,
1).
Merci de m'aider
Bonsoir Michel,
Avant de faire ma demande sur le groupe, j'avais déjà fait le pas à pas
pour
trouver l'erreur. J'ai tout de même fait ce que tu m'as dit et je n'ai pas
plus d'information à donner que mon précédent message à savoir l'endroit
de
l'erreur qui se trouve à la ligne suivante : For L = 1 To UBound(tabtemp,
1).
Merci de m'aider
Bonsoir Michel,
Avant de faire ma demande sur le groupe, j'avais déjà fait le pas à pas
pour
trouver l'erreur. J'ai tout de même fait ce que tu m'as dit et je n'ai pas
plus d'information à donner que mon précédent message à savoir l'endroit
de
l'erreur qui se trouve à la ligne suivante : For L = 1 To UBound(tabtemp,
1).
Merci de m'aider