I am trying to make some logic that will evaluate a set of rules and then report via msgbox or a userform (which ever is best) the variables that are "False".
In the above once a user submits via button on a form any of the flags that are set to "False" I would want to display what needs to be taken care of.Code:If sLbFlag1 = False OrElse sTbFlag2 = False OrElse sTbFlag3 = False OrElse sTbFlag4 = False OrElse sTbFlag5 = False Then MsgBox("Incomplete data on form.") Else 'Code removed cause its TSNS (Top Secret Ninja Stuff). End IF
sLbFlag1 = ListBox1
sTbFlag2 = TextBox2
sTbFlag3 = TextBox3
sTbFlag4 = TextBox4
sTbFlag5 = TextBox5
Such as assuming; sTbFlag2 and sTbFlag5 are "False" then the message would be something like:
"TextBox2 and TextBox5 must be completed to continue."
Any hints, tips or examples are appreciated.




Reply With Quote