+ Reply to Thread
Results 1 to 4 of 4

VBA to hide userform frame until condition met

  1. #1
    Forum Contributor
    Join Date
    07-02-2012
    Location
    UK
    MS-Off Ver
    365/2008
    Posts
    152

    VBA to hide userform frame until condition met

    Hi

    I have a vba userform with a frame (Frame1) that needs to be hidden until the value of textbox (Reason) is "Yes". I've entered the below vba but it doesn't work at all so I need some help please. I don't even know if I have chosen the correct declaration for this?

    Please Login or Register  to view this content.

    **Edit: I should have added that I want the controls within the frame to be hidden along with the frame (not sure if it makes a difference to the code).
    Last edited by xybadog; 07-05-2021 at 10:31 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,785

    Re: VBA to hide userform frame until condition met

    I would try this.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If this does not work please attach your file. See yellow banner at the top of the page.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    07-02-2012
    Location
    UK
    MS-Off Ver
    365/2008
    Posts
    152

    Re: VBA to hide userform frame until condition met

    Quote Originally Posted by 6StringJazzer View Post
    I would try this.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If this does not work please attach your file. See yellow banner at the top of the page.


    Hi

    No, unfortunately, that didn't work so I've attached my file.

    On the launcher, select "Employer Transfer", that is the userform with Frame1 and the textbox (NewL) that holds the "Yes" value. In my OP I stated the textbox was named Reason but that is incorrect, it is NewL

    *Removed attachment
    Last edited by xybadog; 07-06-2021 at 02:57 AM.

  4. #4
    Forum Contributor
    Join Date
    07-02-2012
    Location
    UK
    MS-Off Ver
    365/2008
    Posts
    152

    Re: VBA to hide userform frame until condition met

    I have actually found a way to make this work now. Rather than using the value of the textbox as a trigger I have used the option button click events that change that textbox value to hide/unhide the frame which was quite simple in the end.:

    Please Login or Register  to view this content.

+ 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. Userform Frame Offset to another frame
    By Ratso in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-04-2019, 02:18 PM
  2. [SOLVED] UserForm Frame
    By brentjohn in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-02-2019, 06:18 AM
  3. Hide/Unhide Userform Text Box Based on Condition
    By lateniteNC1 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-15-2017, 10:41 AM
  4. Userform frame progress bar for userform completion
    By ABSTRAKTUS in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-12-2017, 11:20 AM
  5. [SOLVED] Userform Multi-Select Listbox Selection Condition to unhide Frame and controls
    By pjbassdc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2016, 10:05 AM
  6. [SOLVED] Looping through controls by frame on userform (frame within a frame)
    By njs27 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2015, 10:21 AM
  7. UserForm with Frame - Problem
    By Fossil_Rock in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2005, 09:49 AM

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