Search code examples
vbaif-statementline-breaks

If Statement With Multiple Lines


I have an if statement with multiple conditions. I cannot see them all in a single window view. Is there a way to separate them on different lines or do they have to be written all in one line?


Solution

  • The VBA line-continuation character is an underscore _

    if ( _
        (something) _
        or (somethingelse) _
    )