bjr
j'ai un probl avec mon code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Private Sub CBOK_Click()
Dim i As Byte
Dim sh As Worksheet
Application.ScreenUpdating = False
With UFdernierN° 'userform
If .TextBox1.Value > .TextBox2.Value Then
For i = 1 To .TextBox1.Value - .TextBox2.Value
Set sh = Sheets("f1")
sh.Copy before:=Sheets("Récap")
Next
End If
End With
Sheets("f1").Select
Application.ScreenUpdating = True
End Sub |
pour la 1ère fois il s'execute trés bien, mais lorsque je supprime les feuilles ajoutées et je voulais reexecuter la macro , elle me donne erreur sur la ligne
sh.Copy before:=Sheets("Récap")
merci.
Partager