Results 1 to 5 of 5

Textbox visible = True based on if textbox has value

Threaded View

  1. #1
    Registered User
    Join Date
    03-23-2019
    Location
    La, USA
    MS-Off Ver
    2016
    Posts
    3

    Textbox visible = True based on if textbox has value

    I have a form with 100+ textboxes and i need the ones that value <> "" to Show. I have added a tag to each one but can not seem to figure it out

    i have a add button if the user needs to add more rows (aka textboxes) so at form start they are set to visible = false. Once the user adds x amount of textboxes and leaves the form the newly added boxes go back into .visible = false state.

    my code as of right now is:

    dim c as control
    
    for each c in me.controls
    if typename(c) = "textBox" then
    c.visible = (c.Text <> vbNullstring)
    end if
    next
    tried using c.tag = "tb"

    nothing either

    I attached a test copy, userform is loaded with textbox .visible = false
    Control source is Sheet1!D7 , it has text in it
    the textbox .tag is set to .tag = "tb"

    The goal is when the textbox has a value, .visible = true
    referencing the .tag

    would diffidently appreciate any help
    Attached Files Attached Files
    Last edited by mcgrawz; 08-19-2019 at 05:35 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] textbox visibility based on specific text/word of other textbox
    By emmr in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 08-01-2019, 03:28 PM
  2. [SOLVED] Userform textbox value to cell only if textbox not empty
    By Catsonheat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-26-2019, 09:20 AM
  3. add a string of locked text to vba textbox based on entry in the same textbox
    By yoursamrit2000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-21-2014, 11:48 PM
  4. [SOLVED] Checking for empty textbox and setfocus the empty textbox
    By subbby in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-23-2013, 02:49 PM
  5. [SOLVED] How to make textbox visible true/false
    By fremarco in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-08-2012, 11:40 PM
  6. Check Or Verify if VISIBLE textbox are empty
    By Zihao123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-24-2012, 03:31 AM
  7. If TextBox has value set visible other TextBoxes, if not set false
    By john55 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-02-2011, 02:53 PM

Tags for this Thread

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