PDA

View Full Version : Solved: simple If statement help



catharsis50
03-22-2012, 09:07 AM
Hi I would just like some confirmation that this will do what I would like it to do:

If diff > 0 <action>
End if


Do I need to add an Else statement and command it to the next line of code if that condition is not met, or will it automatically continue to the next line should the variable 'diff' be less than zero?

Thanks for the help.

Bob Phillips
03-22-2012, 09:31 AM
You do not need a 'do nothing' else, but action should be on its own line if you use End If.

It isn't hard to just try these things.

CatDaddy
03-22-2012, 10:14 AM
If someCondition Then
'Do this stuff
End If

CatDaddy
03-22-2012, 10:16 AM
it will automatically continue if the condition is not met

catharsis50
03-22-2012, 11:18 AM
Perfect, thanks Catdaddy.

CatDaddy
03-22-2012, 11:23 AM
no problemo