none
vba condition If..Then RRS feed

  • Question

  • Hi everyone,

    I have a short question related with the condition "if". Is it possible to set as a condition "If X=a+b Then"? or the condition if only registers X=z without any operation in it. 

    Thanks

    Wednesday, January 30, 2019 9:50 AM

Answers

  • The condition can be any expression that evaluates to True/False or even to a number (any non-zero number will be treated as True, and zero will be treated as False).

    So you can use

        If X = a + b Then

    or

        If a + b Then


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Wednesday, January 30, 2019 10:05 AM