+ Reply to Thread
Results 1 to 3 of 3

Setting the page index in a mulipage user form

Hybrid View

  1. #1
    Trefor
    Guest

    Setting the page index in a mulipage user form

    I got some help ealry on when I first started using userforms and I wanted
    the page to also be the default page so I added MultiPage1.Value = 0 to the
    UserForm_Initialize() sub. Now I want to be able to preselt which page is the
    "active" page, how can I do this?

    Sub UserForm_Initialize()
    Me.Height = Application.Height
    Me.Width = Application.Width
    MultiPage1.Value = 0
    End Sub

    --
    Trefor

  2. #2
    Tom Ogilvy
    Guest

    RE: Setting the page index in a mulipage user form

    zero is the first page. If you wanted the third page to be the topmost page
    you would do

    Sub UserForm_Initialize()
    Me.Height = Application.Height
    Me.Width = Application.Width
    MultiPage1.Value = 2
    End Sub

    --
    Regards,
    Tom Ogilvy


    "Trefor" wrote:

    > I got some help ealry on when I first started using userforms and I wanted
    > the page to also be the default page so I added MultiPage1.Value = 0 to the
    > UserForm_Initialize() sub. Now I want to be able to preselt which page is the
    > "active" page, how can I do this?
    >
    > Sub UserForm_Initialize()
    > Me.Height = Application.Height
    > Me.Width = Application.Width
    > MultiPage1.Value = 0
    > End Sub
    >
    > --
    > Trefor


  3. #3
    Trefor
    Guest

    RE: Setting the page index in a mulipage user form

    Tom,

    Thanks, but what I needed to do was be able to pick and change which is the
    default page and I was not sure how. I simply replaced the 2 in your example
    with a variable before the userform.show and this seems to have done the
    trick. Many thanks.

    --
    Trefor


    "Tom Ogilvy" wrote:

    > zero is the first page. If you wanted the third page to be the topmost page
    > you would do
    >
    > Sub UserForm_Initialize()
    > Me.Height = Application.Height
    > Me.Width = Application.Width
    > MultiPage1.Value = 2
    > End Sub
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Trefor" wrote:
    >
    > > I got some help ealry on when I first started using userforms and I wanted
    > > the page to also be the default page so I added MultiPage1.Value = 0 to the
    > > UserForm_Initialize() sub. Now I want to be able to preselt which page is the
    > > "active" page, how can I do this?
    > >
    > > Sub UserForm_Initialize()
    > > Me.Height = Application.Height
    > > Me.Width = Application.Width
    > > MultiPage1.Value = 0
    > > End Sub
    > >
    > > --
    > > Trefor


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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