Exit sub

bonjour,

j aurais besoin de votre car je suis bloque pour sortir de ma macro

a ce niveau

dercol = Range("A2:E2").End(xlToRight).Column

              x = x + 1

              If dercol = "" Then
              Exit Sub
              End If

pourriez vous me corriger cela svp

Bonjour,

Pour pouvoir t'aider efficacement ... le strict minimum serait que tu postes la totalité de ta macro ...

et ... idéalement ... joindre ton fichier ...

Bonjour,

Tu pourrais peut-être définir l'objectif de la chose.

Sinon, essaie ceci :

Public Sub TEST()
Dim n As Long
    With ActiveSheet
        n = .Cells(2, .Columns.Count).End(xlToLeft).Column
        If n = 1 Then Exit Sub
    End With
End Sub
Rechercher des sujets similaires à "exit sub"