Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Multipages in a userform

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Can anyone help? If i have a userform with a multipage in it, and on the first page of the multipage i have a button, can i get the button (when clikced) to activate and goto the second page of the multipage?
    i really need to know, thanks

    [ This Message was edited by: willlobb on 2002-03-31 09:11 ]

    [ This Message was edited by: willlobb on 2002-03-31 09:28 ]

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You could try the following (Value can be from 0 to 1 less than the number of pages you have in your multipage):-

    Private Sub CommandButton1_Click()

    MultiPage1.Value = 1

    End Sub

    Not sure why you'd want to do this though?

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks MudFace,
    that worked, now is there anyway of getting it to go to the next page? ie page x. would it be possible to use the CStr thingy?
    by the way, im making a financial system for my young enterprise company and i have a user form where you enter the no. of hours each employee has worked. each person is on a separate page of a multipage, so when you enter the first persons hours i want it to goto the next person automatically (if any of that makes sense!)
    thanks
    Will

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    OK, the following will advance you through the pages one by one, then loop back to the first page when you reach the end: -

    Private Sub CommandButton1_Click()

    If MultiPage1.Pages.Count - 1 > MultiPage1.Value Then
    MultiPage1.Value = MultiPage1.Value + 1
    Else:
    MultiPage1.Value = 0
    End If

    End Sub

  5. #5
    Board Regular
    Join Date
    Mar 2002
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks alot.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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