add a label to Multipages

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
In design mode in the VBE,
right click on the tab of the mulipage and select New Page. Now your code
should work.
 
That code works, so what is the problem?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
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)
 
Back
Top