charlyparis
XLDnaute Nouveau
Voilà le problème:
Au début, je lançais cette macro à partir d'une case d'option du menu formulaire qui marchait très bien mais je me suis rendu compte qu'ill fallait plutôt que j'utilise des cases à cocher (Checkbox du menu Contrôle!) pour ce travail.
Donc je voudrais qu'en cochant le case, ca lance ma macro qui copie des données d'un tableau sur une autre feuille. Avec la case d'option, ca marche normalement mais avec la checkbox, ca ne copie rien!
Aidez-moi, svp!
Bon bien sûr je suis débutant!
Merci d'avance pour votre aide.
Voilà le programme :
Private Sub CheckBox3_Click()
If CheckBox3.Value = True Then
Worksheets("SF SI").Select
Dim i
Dim j
Dim k
Dim NumeroLigne
Dim boucleur
Dim N
'Dim boucleurbis
i = 4
'Application.CutCopyMode = False
For j = 4 To 62
Worksheets("SF SI").Select
If Cells(j, 7).Value <> "" Then
Range(Cells(j, 1), Cells(j, 4)).Select
Selection.Copy
Worksheets("Vos Compétences SF SI").Select
If IsEmpty(Range("A4")) Then
Worksheets("Vos Compétences SF SI").Range("A" & i).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
i = i + 1
Else
Worksheets("Vos Compétences SF SI").Select
NumeroLigne = Worksheets("Vos Compétences SF SI").Range("A62").End(xlUp).Row + 1
Worksheets("Vos Compétences SF SI").Range("A" & NumeroLigne).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End If
End If
Next j
End If
End Sub
Au début, je lançais cette macro à partir d'une case d'option du menu formulaire qui marchait très bien mais je me suis rendu compte qu'ill fallait plutôt que j'utilise des cases à cocher (Checkbox du menu Contrôle!) pour ce travail.
Donc je voudrais qu'en cochant le case, ca lance ma macro qui copie des données d'un tableau sur une autre feuille. Avec la case d'option, ca marche normalement mais avec la checkbox, ca ne copie rien!
Aidez-moi, svp!
Bon bien sûr je suis débutant!
Merci d'avance pour votre aide.
Voilà le programme :
Private Sub CheckBox3_Click()
If CheckBox3.Value = True Then
Worksheets("SF SI").Select
Dim i
Dim j
Dim k
Dim NumeroLigne
Dim boucleur
Dim N
'Dim boucleurbis
i = 4
'Application.CutCopyMode = False
For j = 4 To 62
Worksheets("SF SI").Select
If Cells(j, 7).Value <> "" Then
Range(Cells(j, 1), Cells(j, 4)).Select
Selection.Copy
Worksheets("Vos Compétences SF SI").Select
If IsEmpty(Range("A4")) Then
Worksheets("Vos Compétences SF SI").Range("A" & i).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
i = i + 1
Else
Worksheets("Vos Compétences SF SI").Select
NumeroLigne = Worksheets("Vos Compétences SF SI").Range("A62").End(xlUp).Row + 1
Worksheets("Vos Compétences SF SI").Range("A" & NumeroLigne).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End If
End If
Next j
End If
End Sub