Tunisieboy
XLDnaute Nouveau
Erreur lors de compilation aide moi svp
Simple Userform pour gestion de gasoil
then the erreur dans la module suivant :
Erreur dans Sub oussama ()
Simple Userform pour gestion de gasoil
VB:
Private Sub Tata_Change()
For i = 22 To 65536
If Cells(i, 1) = Tata Then
Cells(i, 1).Select
Matricule.Value = Range("B" & ActiveCell.Row).Value
KM = Range("C" & ActiveCell.Row).Value
CarteShell = Range("D" & ActiveCell.Row).Value
BonGasoil = Range("E" & ActiveCell.Row).Value
SurChantier.Value = Range("F" & ActiveCell.Row).Value
Commentaire.Value = Range("G" & ActiveCell.Row).Value
Exit For
End If
Next i
End Sub
Private Sub CommandButton1_Click()
If Oussama.Tata <> "" Then
MsgBox " Veuillez cliquer sur le bouton MODIFIER "
Exit Sub
End If
'With Feuil1.ListObjects(1)
'.ListRows.Add
If Range("B22") = "" Then
Range("B22").Select
Else
Range("B21").End(xlDown).Offset(1, 0).Select
End If
If Range("B22") = "" Then
ActiveCell.Offset(0, 6) = 1
ActiveCell.Value = Matricule & " " & "-" & 1
Else
ActiveCell.Offset(0, 6) = ActiveCell.Offset(-1, 6) + 1
ActiveCell.Value = Matricule & " " & "-" & ActiveCell.Offset(0, 6)
End If
ActiveCell.Offset(0, 1).Value = Matricule.Value
ActiveCell.Offset(0, 2).Value = KM
ActiveCell.Offset(0, 3).Value = CarteShell
ActiveCell.Offset(0, 4).Value = BonGasoil
ActiveCell.Offset(0, 5).Value = SurChantier.Value
ActiveCell.Offset(0, 6).Value = Commentaire.Value
If Suppr = True Then
ActiveCell.EntireRow.Delete
End If
Unload Me
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub CommandButton3_Click()
Range("B" & ActiveCell.Row).Value = Matricule.Value
Range("C" & ActiveCell.Row).Value = KM
Range("D" & ActiveCell.Row).Value = CarteShell
Range("E" & ActiveCell.Row).Value = BonGasoil
Range("F" & ActiveCell.Row).Value = SurChantier.Value
Range("G" & ActiveCell.Row).Value = Commentaire.Value
If Suppr = True Then
ActiveCell.EntireRow.Delete
End If
Unload Me
End Sub
Private Sub UserForm_Initialize()
Matricule.List = Array("5107TU199", "5108TU199", "5109 TU199", "4101 TU160", "1452 TU159", "1458 TU159", "9301 TU158", "9298 TU158", "9297 TU158", "9293 TU158", "76 TU157", "78 TU157", "6587 TU155", "6591 TU155", "6592 TU155", "7486 TU135", "7487 TU135", "9060 TU134", "9061 TU134", "119 TU130", "4998 TU130", "399 TU129", "9389 TU136", "8958 TU160")
End Sub
then the erreur dans la module suivant :
Code:
Sub Oussama()
Dim vCellule As Object
Load Oussama
For Each vCellule In Sheets("Gasoil").Range("Matricule")
If vCellule = "" Then Exit For
Oussama.Tata.AddItem vCellule.Value
Next
'Saisie.CmbListeTypes.ListIndex = 0
Oussama.Show
End Sub
Sub supprimer()
Sheets("Gasoil").Range("B22:L65536").ClearContents
End Sub
Erreur dans Sub oussama ()