add a label to Multipages

O

OkieViking

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
 
T

Tom Ogilvy

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

Bob Phillips

That code works, so what is the problem?

--

HTH

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

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top