+ Reply to Thread
Results 1 to 6 of 6

Help to control Frame visibility on Userform Initialized

  1. #1
    Forum Contributor
    Join Date
    03-14-2013
    Location
    Maryland, USA
    MS-Off Ver
    Excel 365
    Posts
    105

    Help to control Frame visibility on Userform Initialized

    Hello Everyone!

    I have an user form wit a lot of field counters, the form its too crowded so divided them in two group using a frame control which is holding the less use counters and want them to be visible only if a check box is selected, I found a code that made the frame to be visible when the check box is uncheck, but the problem I have now is that when I open the user form the two frame are visible and only after I click and unclick the checkbox the second fame become invisible with all the controls, looking in to this and other forum I found that it has to be with the initialize event of the user form but I can't find the right code.

    This is the code I had so far that made the frame invisible only after I click when the user form is open, but I really want it to be invisible at the time I open the user form.

    Thank you in advance for your help or suggestion.

    Alex

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help to control Frame visibility on Userform Initialized

    Hi,

    Place this code into the UserForm module:
    Please Login or Register  to view this content.
    This may also be possible by simply setting the visibility property of the frame to false, and then this acts as default when the userform is initialised, hence you don't need code to handle this for you.

    I would probably also suggest using this code if your userform is likely to be opened multiple times per session though:
    Please Login or Register  to view this content.
    This will make the frame invisible every time the form is activated, not only the first time.

    Hope this helps

  3. #3
    Forum Contributor
    Join Date
    03-14-2013
    Location
    Maryland, USA
    MS-Off Ver
    Excel 365
    Posts
    105

    Re: Help to control Frame visibility on Userform Initialized

    Hi ajryan88,

    Thank you for responding to my post, I did it as your instructions and work perfectly. I went the simple way setting up the visibility property to False.
    Also, my user form is a multipage and I would have the same frame set up of two or three per page, on another post I read about creating a class module but the code were not clear for me (beginner), it's this the way you will recommend for my setting or is better to set every individual frame.

    Thank you in advance for your help on this, I really appreciate it.

    Again this is the best place with the best people!!!!

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help to control Frame visibility on Userform Initialized

    Definitely set every individual frame.

    Hope this helps

  5. #5
    Forum Contributor
    Join Date
    03-14-2013
    Location
    Maryland, USA
    MS-Off Ver
    Excel 365
    Posts
    105

    Re: Help to control Frame visibility on Userform Initialized

    Thank you very much for your help, it works perfectly, I set every individual frame and love the way it is..

    Kudos for you my friend !!!!!


  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help to control Frame visibility on Userform Initialized

    No problems!

    Please don't forget to click on the * next to my post to say thanks

+ 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] Checking a userForm that has not been initialized
    By Arne Hegefors in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-02-2006, 09:50 AM
  2. [SOLVED] Frame from Control Toolbox?!
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2006, 05:10 PM
  3. [SOLVED] Use VBA to control scrollbars in a Frame
    By gary in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-26-2006, 05:20 PM
  4. [SOLVED] How does Userform get initialized by this?
    By RB Smissaert in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2005, 01:50 PM
  5. [SOLVED] Userform runs other subs when initialized
    By zipdog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-02-2005, 12:06 PM

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