+ Reply to Thread
Results 1 to 3 of 3

Change Label Top on UserForm based on Count

  1. #1
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    Change Label Top on UserForm based on Count

    I am using a UserForm to do a validation of what might be incomplete on a worksheet. I am trying to get the different labels to appear in the appropriate next location and trying to use a count to do it. So that if label 1 visible and label 3 visible, there is no blank space between them where label 2 would be if it needed to be visible. Short piece of not working code below - there is a potential for 6 labels.

    Please Login or Register  to view this content.
    Last edited by ker9; 02-10-2012 at 01:18 PM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,180

    Re: Change Label Top on UserForm based on Count

    Do you really need to use labels? How about using a list box then you simply additem if caption text is to be displayed.

    Currently your code only has lTop set once and not incremented if a label contains text.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    Re: Change Label Top on UserForm based on Count

    Hi, Andy
    Thank you for your response. I never thought to use a list. That might be a better idea.
    I did finally get my code to work - see below

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1