Results 1 to 3 of 3

Thread: visibility

  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a wonderful function for making lables visible and invisible.:
    Sub ShowCVL(f As Boolean)
    'ShowLabels True; ShowLabels False
    Dim i As Integer

    For i = 1 To 8 ' change to number of labels
    Me.Controls("LblCVL" & i).Visible = f
    Next i
    End Sub

    Can i also include in it the List box ListCVL ? because the list box goes together with the labels

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Do you have list boxes ListCVL1, ..., ListCVL8?
    If so, add the following line inside the For ... Next loop:

    Me.Controls("ListCVL" & i).Visible = f

    Or do you have a single list box ListCVL?
    In that case, add the following line after the For ... Next loop:

    Me.Controls("ListCVL").Visible = f

  3. #3
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='799494' date='23-Oct-2009 08:46']Do you have list boxes ListCVL1, ..., ListCVL8?
    If so, add the following line inside the For ... Next loop:

    Me.Controls("ListCVL" & i).Visible = f

    Or do you have a single list box ListCVL?
    In that case, add the following line after the For ... Next loop:

    Me.Controls("ListCVL").Visible = f[/quote]


    Yes !! it is wonderful ! Works in an instant !! Thank you !!

Posting Permissions

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