Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That code works, so what is the problem?
-- HTH RP (remove nothere from the email address if mailing direct) "OkieViking" wrote in message ... 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() -- HTH RP (remove nothere from the email address if mailing direct) "OkieViking" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing the font for part of an axis label, not the whole label. | Charts and Charting in Excel | |||
How to rezize data label box in pie charts (label wraps to two lin | Charts and Charting in Excel | |||
Using Multipages in a Form | Excel Programming | |||
MultiPages | Excel Programming | |||
Scrolling in Multipages | Excel Programming |