+ Reply to Thread
Results 1 to 6 of 6

How to make textbox visible true/false

  1. #1
    Registered User
    Join Date
    03-13-2012
    Location
    perth,australia
    MS-Off Ver
    Excel 2007
    Posts
    25

    How to make textbox visible true/false

    Hi Again All.

    I have written this code to make 2 textboxes appear/disappear on my userform. I've obviously done it wrong as the visibility bit works but not the part where I want the textboxes to disappear. Basically I want them to disappear if anything other than "Honeycombs" is in the ComboBox.

    Please Login or Register  to view this content.
    It's probably staring me in the face but I just can't see it. Thanks, as usual, for any help. All the best
    Last edited by fremarco; 08-08-2012 at 11:34 PM.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: How to make textbox visible true/false

    Try this,

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to make textbox visible true/false

    I would use a simpler construct of:

    Please Login or Register  to view this content.
    The toggles the visibility automatically based on whether the ( ) test is true. if true, they are visible, if not, they are not visible.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: How to make textbox visible true/false

    @fremarco,

    I like Jerry's answer but just to add to it I would go one step further using Ucase. So weather user types in Ex: HoneyCOmbs or honeycombs or any variation of the word it will work

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-13-2012
    Location
    perth,australia
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: How to make textbox visible true/false

    Thanks both of you for answering so quickly. I'm spoilt for choice now as all the codes work brilliantly. Do you guys ever sleep?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to make textbox visible true/false

    Sleep is for people who use pen and paper.

+ 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