+ Reply to Thread
Results 1 to 6 of 6

add a label to Multipages

  1. #1
    OkieViking
    Guest

    add a label to Multipages

    I am trying to create a simple multipage userform with a label on each page
    with some text. For the first two pages I can enter in the label by hand.
    However, since multipage only comes with two pages, I have to use VBA to add
    extra pages. I am able to add the extra pages, but I am unable to add a
    label to the new pages. Below is my code. What do I need to do to add a
    label to page three?





    Private Sub UserForm_Initialize()
    MultiPage1.Pages(0).Caption = "Sort by Color"
    MultiPage1.Pages(1).Caption = "Summary Report"
    MultiPage1.Pages(2).Caption = "New Trouble Time"


    End Sub


  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Quote Originally Posted by =?Utf-8?B?T2tpZVZpa2luZw==?=
    I am trying to create a simple multipage userform with a label on each page
    with some text. For the first two pages I can enter in the label by hand.
    However, since multipage only comes with two pages, I have to use VBA to add
    extra pages. I am able to add the extra pages, but I am unable to add a
    label to the new pages. Below is my code. What do I need to do to add a
    label to page three?





    Private Sub UserForm_Initialize()
    MultiPage1.Pages(0).Caption = "Sort by Color"
    MultiPage1.Pages(1).Caption = "Summary Report"
    MultiPage1.Pages(2).Caption = "New Trouble Time"



    End Sub

    Hello ,

    Set the Multipage1.Page(2).Caption Property using the VBE Property Sheet. That sholud it.

    Hope this helps,
    Leith Ross

  3. #3
    Tom Ogilvy
    Guest

    Re: add a label to Multipages

    In design mode in the VBE,
    right click on the tab of the mulipage and select New Page. Now your code
    should work.
    --
    Regards,
    Tom Ogilvy



    "OkieViking" <[email protected]> wrote in message
    news:[email protected]...
    > I am trying to create a simple multipage userform with a label on each

    page
    > with some text. For the first two pages I can enter in the label by hand.
    > However, since multipage only comes with two pages, I have to use VBA to

    add
    > extra pages. I am able to add the extra pages, but I am unable to add a
    > label to the new pages. Below is my code. What do I need to do to add a
    > label to page three?
    >
    >
    >
    >
    >
    > Private Sub UserForm_Initialize()
    > MultiPage1.Pages(0).Caption = "Sort by Color"
    > MultiPage1.Pages(1).Caption = "Summary Report"
    > MultiPage1.Pages(2).Caption = "New Trouble Time"
    >
    >
    > End Sub
    >




  4. #4
    Bob Phillips
    Guest

    Re: add a label to Multipages

    That code works, so what is the problem?

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "OkieViking" <[email protected]> wrote in message
    news:[email protected]...
    > I am trying to create a simple multipage userform with a label on each

    page
    > with some text. For the first two pages I can enter in the label by hand.
    > However, since multipage only comes with two pages, I have to use VBA to

    add
    > extra pages. I am able to add the extra pages, but I am unable to add a
    > label to the new pages. Below is my code. What do I need to do to add a
    > label to page three?
    >
    > Private Sub UserForm_Initialize()
    > MultiPage1.Pages(0).Caption = "Sort by Color"
    > MultiPage1.Pages(1).Caption = "Summary Report"
    > MultiPage1.Pages(2).Caption = "New Trouble Time"
    >
    >
    > End Sub
    >




  5. #5
    Bob Phillips
    Guest

    Re: add a label to Multipages

    If you mean how do you add pages in VBA, use


    MultiPage1.Pages.Add

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "OkieViking" <[email protected]> wrote in message
    news:[email protected]...
    > I am trying to create a simple multipage userform with a label on each

    page
    > with some text. For the first two pages I can enter in the label by hand.
    > However, since multipage only comes with two pages, I have to use VBA to

    add
    > extra pages. I am able to add the extra pages, but I am unable to add a
    > label to the new pages. Below is my code. What do I need to do to add a
    > label to page three?
    >
    >
    >
    >
    >
    > Private Sub UserForm_Initialize()
    > MultiPage1.Pages(0).Caption = "Sort by Color"
    > MultiPage1.Pages(1).Caption = "Summary Report"
    > MultiPage1.Pages(2).Caption = "New Trouble Time"
    >
    >
    > End Sub
    >




  6. #6
    Bob Phillips
    Guest

    Re: add a label to Multipages



    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "OkieViking" <[email protected]> wrote in message
    news:[email protected]...
    > I am trying to create a simple multipage userform with a label on each

    page
    > with some text. For the first two pages I can enter in the label by hand.
    > However, since multipage only comes with two pages, I have to use VBA to

    add
    > extra pages. I am able to add the extra pages, but I am unable to add a
    > label to the new pages. Below is my code. What do I need to do to add a
    > label to page three?
    >
    >
    >
    >
    >
    > Private Sub UserForm_Initialize()
    > MultiPage1.Pages(0).Caption = "Sort by Color"
    > MultiPage1.Pages(1).Caption = "Summary Report"
    > MultiPage1.Pages(2).Caption = "New Trouble Time"
    >
    >
    > End Sub
    >




+ 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