Results 1 to 4 of 4

Thread: Labels and If statement [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Location
    Chicago
    Posts
    136

    Resolved 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?
    Last edited by bat711; Jun 17th, 2005 at 04:21 PM.
    CodeBank: Launch IE

  2. #2
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    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:
    1. If (Label1.Visible = False) And (Label2.Visible = False) And (Label3.Visible = False) Then ' Continue adding And (lblName.Visible = False) untill you are done
    2.     ' Do soemthing here.
    3. End If

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Location
    Chicago
    Posts
    136

    Talking Re: Labels and If statement

    Eh, I was using & instead of And no wonder.
    CodeBank: Launch IE

  4. #4
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Labels and If statement

    Quote Originally Posted by bat711
    Eh, I was using & instead of And no wonder.

    & is normally used for joining strings so nope, that would now work

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width