Results 1 to 4 of 4

VBA to hide userform frame until condition met

Threaded View

xybadog VBA to hide userform frame... 07-05-2021, 10:10 AM
6StringJazzer Re: VBA to hide userform... 07-05-2021, 10:51 AM
xybadog Re: VBA to hide userform... 07-05-2021, 11:05 AM
xybadog Re: VBA to hide userform... 07-06-2021, 02:55 AM
  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?

    Private Sub UserForm_Change(ByVal Target As Range)
        Application.ScreenUpdating = False
         If Reason.Value = "Yes" Then
            Frame1.Visible = True
         Else
            Frame1.Visible = False
         End If
        Application.ScreenUpdating = True
    End Sub

    **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.

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