Bonjour,
J'ai un problème avec ce code, il m'indique "objet requis sur la ligne du "Set". Pouvez-vous m'aider?
Sub Commande_payer()
Dim nomclient As String
Set nomclient = ActiveWorksheet.Name
Range("C5:G13").Cut
Application.ScreenUpdating = False
Workbooks("Fiches-Clients").Activate
For Each Onglet In Workbooks("Fiches-Clients").Worksheets
If (Onglet.Name) And IsNumeric(nomclient) Then
If CInt(Onglet.Name) = CInt(nomclient) Then
Onglet.Select
Exit Sub
End If
Else
If Trim(Onglet.Name) = Trim(nomclient) Then
Onglet.Select
Exit Sub
End If
End If
Next
MsgBox "Feuille non trouvée"
End Sub