Search code examples
excelvbasubroutine

VBA: include the subroutine to the condtion


Could you help me please with the syntax: I would like to include the subroutine FRAIS_bis() in my code, but when I'm writing the code it appears in red.

 Worksheets("5 - Tarification").Range("L26").Interior.ColorIndex = 15

    If Worksheets("5 - Tarification").Range("X12").Value = False Then
    If Len(Worksheets("1 - Feuille de Suivi Commercial").Range("E16").Value) > 0
    Then
        FRAIS_bis()
        
    Else
    Worksheets("5 - Tarification").Range("X4").Value = False

Thank you for your help !


Solution

  • You need to add Call before the name of the subroutine (or not use brackets), everything is explained here.