Erreur d'éxécution 1004
Résolu
Rjp62
Messages postés
46
Statut
Membre
-
Rjp62 Messages postés 46 Statut Membre -
Rjp62 Messages postés 46 Statut Membre -
pourquoi cette erreur d'éxécution 1004 ?
ci-joint mon programme.
l'erreur s'affiche à : Ligne = sheets ("fichier des Articles").range("a3000").end(x1Up).row + 1
merci pour votre aide.
Private Sub CommandButton1_Click()
'double click bouton ajouter
If ComboBox1.Value = "" Then
MsgBox "veuillez renseigner le champs 'Société'"
Else
Dim ligne As Integer
If MsgBox("confirmez-vous l'ajout des données ?", vbYesNo, "confirmation") = vbYes Then
Worksheets("Fichier des articles").Select
ligne = Sheets("Fichier des articles").Range("A3000").End(x1Up).Row + 1
Cells(ligne, 1) = ComboBox1.Value
Cells(ligne, 2) = TextBox2.Value
Cells(ligne, 3) = TextBox3.Value
Cells(ligne, 4) = ComboBox4.Value
Cells(ligne, 5) = TextBox5.Value
Cells(ligne, 6) = ComboBox2.Value
Cells(ligne, 7) = TextBox7.Value
Cells(ligne, 8) = TextBox8.Value
Cells(ligne, 9) = TextBox9.Value
Cells(ligne, 10) = TextBox10.Value
Unload FichierdesArticles
FichierdesArticles.Show
Else
End If
End If
End Sub
ci-joint mon programme.
l'erreur s'affiche à : Ligne = sheets ("fichier des Articles").range("a3000").end(x1Up).row + 1
merci pour votre aide.
Private Sub CommandButton1_Click()
'double click bouton ajouter
If ComboBox1.Value = "" Then
MsgBox "veuillez renseigner le champs 'Société'"
Else
Dim ligne As Integer
If MsgBox("confirmez-vous l'ajout des données ?", vbYesNo, "confirmation") = vbYes Then
Worksheets("Fichier des articles").Select
ligne = Sheets("Fichier des articles").Range("A3000").End(x1Up).Row + 1
Cells(ligne, 1) = ComboBox1.Value
Cells(ligne, 2) = TextBox2.Value
Cells(ligne, 3) = TextBox3.Value
Cells(ligne, 4) = ComboBox4.Value
Cells(ligne, 5) = TextBox5.Value
Cells(ligne, 6) = ComboBox2.Value
Cells(ligne, 7) = TextBox7.Value
Cells(ligne, 8) = TextBox8.Value
Cells(ligne, 9) = TextBox9.Value
Cells(ligne, 10) = TextBox10.Value
Unload FichierdesArticles
FichierdesArticles.Show
Else
End If
End If
End Sub
A voir également:
- Erreur d'éxécution 1004
- Erreur 0x80070643 - Accueil - Windows
- Erreur 4201 france tv ✓ - Forum Réseaux sociaux
- Erreur 4101 france tv - Forum Lecteurs et supports vidéo
- J'aime par erreur facebook notification - Forum Facebook
- Code erreur f3500-31 ✓ - Forum Bbox Bouygues
3 réponses
rE?
Ceci fonctionne :
Ceci fonctionne :
Private Sub CommandButton1_Click() 'click bouton ajouter Dim ligne As Long If ComboBox1.Value = "" Then MsgBox "veuillez renseigner le champs 'Société'" Else If MsgBox("confirmez-vous l'ajout des données ?", vbYesNo, "confirmation") = vbYes Then With Worksheets("Fichier des articles") ligne = .Range("A3000").End(xlUp).Row + 1 .Cells(ligne, 1) = ComboBox1.Value .Cells(ligne, 2) = TextBox2.Value .Cells(ligne, 3) = TextBox3.Value .Cells(ligne, 4) = ComboBox4.Value .Cells(ligne, 5) = TextBox5.Value .Cells(ligne, 6) = ComboBox2.Value .Cells(ligne, 7) = TextBox7.Value .Cells(ligne, 8) = TextBox8.Value .Cells(ligne, 9) = TextBox9.Value .Cells(ligne, 10) = TextBox10.Value End With Else End If End If End Sub