+ Reply to Thread
Results 1 to 5 of 5

Making Unused UserForm Textboxes Invisible

  1. #1
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Making Unused UserForm Textboxes Invisible

    I have 6 text boxes on a form. I have the number of strings that will be assigned to text boxes in a variable called Number (Integer). So if number is 3, only the first 3 textboxes will have anything in them. I want the remaining textboxes to be invisible. Here's my code that doesn't work
    Please Login or Register  to view this content.
    Thanks in advance.
    Last edited by ChemistB; 05-05-2011 at 12:52 PM.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

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

    Re: Making Unused UserForm Textboxes Invisible

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    07-31-2010
    Location
    essex
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Making Unused UserForm Textboxes Invisible

    Hi

    What is the current value of number
    this works fine with nunber set greater that 0

    Please Login or Register  to view this content.

    Lima

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Making Unused UserForm Textboxes Invisible

    You're both right. I don't know what I was doing wrong the first tiime. Maybe I didn't reinitialize Number. Thanks!

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Making Unused UserForm Textboxes Invisible

    You'd better use:

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by snb; 05-05-2011 at 01:09 PM.



+ 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