+ Reply to Thread
Results 1 to 7 of 7

UserForm Knowledge Needed to make labels visible and unvisble based on event change

  1. #1
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    295

    UserForm Knowledge Needed to make labels visible and unvisble based on event change

    Hello

    I need some help with getting my userform to work correctly. I am new to this so please excuse my ignorance.

    If you look at the attached sample spreadsheet, I have a userform called "frmBuildings" created with 11 labels, 1 scroll bar, and 2 commands. SHEET1 contains the macro to call the userform.

    The Scroll bar changes the values within "tbxBuidlingcount." I think I have them linked together correctly as it appears they are working they way they should.

    My goal is to have the user use the scroll bar to select how many "buildings" there are, then once they hit the command button "GO", it will make visible that many (meaning the value in text box "tbxBuidlingcount") labels/text boxes.

    This makes more sense once you look at the userform.

    I know this is probably easy...I jsut cant find anywhere on the interenet that shows me how to do that.

    Thanks in advance.
    Attached Files Attached Files
    Last edited by clemsoncooz; 01-20-2012 at 08:57 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: UserForm Knowledge Needed to make labels visible and unvisble based on event chan

    Hi,

    Please Login or Register  to view this content.
    Not that it matters but note the mis-spelling of 'building'
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    295

    Re: UserForm Knowledge Needed to make labels visible and unvisble based on event chan

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    Please Login or Register  to view this content.
    Not that it matters but note the mis-spelling of 'building'

    This is just what I asked for! Thank you so much!

    But now if I can add to my request... this only works when the scroll bar is increased.....can you get it to work when the scroll bar is used to decrease the selection by 1?

    So for example. if the user uses the scrollbar and scrolls to 5....then hits the "GO" command - your code will work and show 5 Building Name rows. BUT now if the user hits the scrollbar for any amount of decrease, lets say down to 3, THEN hits "GO" again, 5 rows still remain.

    Can you get it to show 3?

    Regardless - thank you so much!!!

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: UserForm Knowledge Needed to make labels visible and unvisble based on event chan

    Hi,

    Simply create a 1-10 loop as the first thing the Go button does, and first make all the text boxes and labels invisible.

  5. #5
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    295

    Re: UserForm Knowledge Needed to make labels visible and unvisble based on event chan

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    Simply create a 1-10 loop as the first thing the Go button does, and first make all the text boxes and labels invisible.

    I guessing you dont mean the opposite of what you did like this
    Please Login or Register  to view this content.
    Do you? B/c that isnt working for me.

    Does it not have to be tied back to the SpinButton1_Change event some how?

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: UserForm Knowledge Needed to make labels visible and unvisble based on event chan

    Hi,

    Yes, that's exactly what I meant since you indicated the trigger is the Go button and not the movement of the spin button. Specifically

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    295

    Re: UserForm Knowledge Needed to make labels visible and unvisble based on event chan

    Thank you!!

+ 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