je suis à la recherche d'une procédure vba voilà je cherche comment faire si une feuille existe alors lancer une macro "macro 1" si elle n'existe pas alors lancer une autre macro "macro 2"
merci si quelqu'un peut me donner une marche à suivre
Public Sub Test()
Dim ws As Worksheet
On Error Resume Next
Set ws = Worksheets("Feuil1")
On Error GoTo 0
If ws Is Nothing Then
Macro1
Else
Macro2
End If
End Sub
Private Sub Macro1()
MsgBox "Macro1"
End Sub
Private Sub Macro2()
MsgBox "Macro2"
End Sub