Labels and If statement [RESOLVED]
I have several labels on a form that have their visible property set to false if certain settings are made. What I would like to do is be able to display another label if all the others have their visible property set false. This If statement is stumping me right now any suggestions?
Re: Labels and If statement
Quote:
Originally Posted by bat711
I have several labels on a form that have their visible property set to false if certain settings are made. What I would like to do is be able to display another label if all the others have their visible property set false. This If statement is stumping me right now any suggestions?
VB Code:
If (Label1.Visible = False) And (Label2.Visible = False) And (Label3.Visible = False) Then ' Continue adding And (lblName.Visible = False) untill you are done
' Do soemthing here.
End If
Cheers,
RyanJ
Re: Labels and If statement
Eh, I was using & instead of And no wonder. :sick:
Re: Labels and If statement
Quote:
Originally Posted by bat711
Eh, I was using & instead of And no wonder. :sick:
& is normally used for joining strings so nope, that would now work :)
Cheers,
RyanJ