Ozgrid Excel Help & Best Practices Forums

Excel Training / Excel Dashboards Reports

Results 1 to 3 of 3

Thread: UserForm: Show/Hide Command Buttons

  1. #1
    Join Date
    17th April 2003

    (Solved) UserForm: Show/Hide Command Buttons

    Greetings all...

    I have a multipage user form with up to 5 pages. I want to give the user buttons at the bottom to navigate (eg Next, Previous, Cancel...) but I don't want all the buttons to appear on each of the 5 pages.

    For example, on the very first page I don't want the Previous command button to show and on the very last page I don't want the Next command button to show.

    I know how to set the display of the first page's buttons based on the Initialize event combined with the Enabled = True/False property. But how do I set the Enabled property for the other pages? I tried it in the Initialize section of the user form code but that only seems to set the first page even though I coded all of them. Is there some sort of UserForm event like there are for Worksheets to detect changes?

    I know I can duplicate all of the buttons inside the multipage control and only put the ones I want on each page but this seems like a lot of extra work. I would like to have them below the multipage frame and just enable/disable their display based on the page I am on in the user form.

    Hopefully this makes some sense... BTW, Excel 2003 on Win XP.


    Excel Video Tutorials / Excel Dashboards Reports

  2. #2
    Join Date
    24th January 2003
    Hi Excelboy

    You would use the MultiPage Change Event to Enable/Disable Next & Previous buttons, e.g;
    Private Sub MultiPage1_Change() 
        Select Case MultiPage1.Value 
        Case 0 'Page1
        Case 1 'page2
        End Select 
    End Sub 

  3. #3
    Join Date
    17th April 2003



    Your code works perfectly for my form. Thanks for the help!


    Excel Video Tutorials / Excel Dashboards Reports

Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Hide/Show Command Buttons With Rows In Worksheet
    By idps in forum Excel General
    Replies: 4
    Last Post: May 30th, 2008, 20:22
  2. Replies: 7
    Last Post: April 10th, 2008, 16:00
  3. Hide Userform & Show Another
    By 2001swimmer in forum Excel General
    Replies: 5
    Last Post: June 1st, 2007, 06:34
  4. Hide UserForm Via Top X & Show Another
    By Joe Derr in forum Excel General
    Replies: 5
    Last Post: December 30th, 2006, 11:23
  5. Replies: 1
    Last Post: March 6th, 2006, 09:02


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts