Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default add a label to Multipages



--

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the font for part of an axis label, not the whole label. amy45 Charts and Charting in Excel 2 April 5th 23 01:11 PM
How to rezize data label box in pie charts (label wraps to two lin rolliedogg Charts and Charting in Excel 1 October 18th 06 08:17 PM
Using Multipages in a Form Azza Excel Programming 1 November 18th 04 05:26 AM
MultiPages Bill[_28_] Excel Programming 1 October 19th 04 05:49 PM
Scrolling in Multipages Omar[_4_] Excel Programming 1 February 23rd 04 12:38 AM


All times are GMT +1. The time now is 08:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"