+ Reply to Thread
Results 1 to 4 of 4

VBA hidden textbox disappears when sheet copied

  1. #1
    Registered User
    Join Date
    01-25-2016
    Location
    USA
    MS-Off Ver
    2013
    Posts
    2

    VBA hidden textbox disappears when sheet copied

    Hey everyone!

    New to the forum, but have used it in the past to figure out some previous VBA issues -- so I figured I'd reach out to see if anyone can help me with my current issue.

    Full disclosure: I'm not the most experienced at VBA, so any dumbed down explanations will be greatly appreciated!

    General idea behind my code *not actual cell references, just an explanation*:

    Cell A1 has a drop down for Case 1 or Case 2
    For each case I have an image and two text boxes that I am making visible/hiding depending on if case 1 or case 2 is selected.

    Case 1: Image 1, TextBox 2 and TextBox 3
    Case 2: Image 2, TextBox 4, Textbox 5

    Right now what I have works flawlessly in the current worksheet, however, when I want to make a copy of the worksheet...some of the text boxes that should be visible now will not reappear, or will show up when they are supposed to be hidden. So example: I select Case 1 and have Image 1, TextBox 2, and TextBox 3 showing -- I now copy this sheet and go to toggle to Case 2 -- however now I have Image 2, TextBox 4, TextBox 5, and either Textbox 2 or 3 now showing OR perhaps TextBox 4 or 5 will be missing.

    I've attached the spreadsheet in question -- I think you will see what I am talking about once you copy the worksheet and look at the 3D labeled images.

    I assume my code is not the prettiest (as I said, totally inexperienced with VBA) -- but if there is any fix that you can think of please feel free to share!

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: VBA hidden textbox disappears when sheet copied

    Talking about a drop down in A1 when there isn't a drop down in A1 and telling us to just copy the sheet and we will see what you mean doesn't help us. You know your sheet and what you should be seeing, we don't.
    Tell us specifically how to recreate the problem, what we will see and what we should see and we can probably work from there.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  3. #3
    Registered User
    Join Date
    01-25-2016
    Location
    USA
    MS-Off Ver
    2013
    Posts
    2

    Re: VBA hidden textbox disappears when sheet copied

    Like I said, the cell references were just used as a simple explanation, not true references... just to give a general idea of what I am doing with the sheet. Sorry for the confusion.


    Anyways, to further clarify with actual references:
    F10 - toggle to Yes
    F11 - toggle to K25% 1
    H179 - toggle to Case 2

    When you look at the 3D image to the right, you will see a text box at the end of each arrow (a steel angle size should be showing here)

    Now make a copy of the sheet. Change Cell F11 to say K33%, you will see two text boxes missing on the 3D image on the left side (TextBox 37 & 38) -- and one from the K25% floating in the upper right corner (TextBox 39).

    Everything works as it should before I copy the sheet, it's only after I copy and then change F11 where I encounter the missing text boxes or text boxes appearing even though I have them set to hidden.

  4. #4
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: VBA hidden textbox disappears when sheet copied

    Like I said, the cell references were just used as a simple explanation, not true references... just to give a general idea of what I am doing with the sheet. Sorry for the confusion.
    Yeah, I get that.
    Like I said, it doesn't help.
    Good luck.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] textbox value disappears when combox1 isselected
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2013, 05:05 AM
  2. Textbox changes position on a copied excel-sheet
    By Hanspeter W. in forum Excel General
    Replies: 0
    Last Post: 07-01-2006, 04:45 PM
  3. Replies: 2
    Last Post: 11-01-2005, 04:09 PM
  4. [SOLVED] [SOLVED] Textbox disappears
    By B. Scace in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-29-2005, 07:05 PM
  5. [SOLVED] textbox scrollbar disappears
    By Yaniv in forum Excel General
    Replies: 3
    Last Post: 06-21-2005, 02:05 PM
  6. [SOLVED] textbox scrollbar disappears
    By Yaniv in forum Excel General
    Replies: 1
    Last Post: 06-20-2005, 07:05 PM
  7. Textbox disappears in freeze panes
    By Waititi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2005, 03:23 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