Probleme execution macro à chaque creation de bouton
bonjour
a chaque validation d'un userform je cree un bouton
"code de création de bouton"
Code:
1 2 3 4 5 6 7
| Sub CreationBouton()
For i = 9 To Sheets("TABLEAU RECAP").Range("B65536").End(xlUp).Row
Sheets("TABLEAU RECAP").Buttons.Add(Range("T" & i).Left, Range("T" & i).Top, Range("T" & i).Width * 1, Range("T" & i).Height).Select
Selection.Characters.Text = "VALIDATION"
Selection.OnAction = "'appelvalid " & i & " '"
Next
End Sub |
cela sa marche ,a cela dès que je clique sur le bouton crée dans le "tableau recap" mon userform3 ne ouvre pas mon code est le suivant
Code:
1 2 3
| Sub appelvalid()
UserForm3.Show
End Sub |
trouvez ci dessous le code de mon userform3
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Private Sub CommandButton1_Click()
Dim L1 As Integer
Dim ds As Worksheet
'protection feuille
Dim cell As Range
Worksheets("TABLEAU RECAP").Unprotect ("cedric")
With ThisWorkbook.Worksheets("TABLEAU RECAP")
L1 = .Cells(.Rows.Count, 2).End(xlUp).Row + 0
.Range("U" & L1).Value = ComboBox1 'NON DU RESPONSABLE'
Worksheets("TABLEAU RECAP").Protect ("cedric"), DrawingObjects:=True, Contents:=True, Scenarios:=True, UserInterfaceOnly:=True
End With
End Sub |
pouvez vous m'aidez