PC Review


Reply
Thread Tools Rate Thread

Confusion on Multipage Tabbing

 
 
WLMPilot
Guest
Posts: n/a
 
      14th Jan 2008
I have two books on Excel VBA and have googled "Multipage Tab" and I am still
in the dark about how to set things up when using this feature. I have
already set up a userform using page1.

The only reference I have made to page1 in my code is below:

Private Sub UserForm_Initialize()
MultiPage1.Value = 0

There is no other reference made anywhere. As best as I can tell, all pages
would be initialized in this section. My code works fine, but I am at a lost
when I start to design other pages. I noticed when I view code from page2,
that all the code from page1 is brought up. Thus my confusion as to how it
is kept separate. Maybe only because the textboxes, combo/Listboxes, etc
will increment. I assume I will not have a textbox1 on both pages.

My question is where and when are references needed regarding multipage
tabbing and how is code like "MultiPage1.Value = 0" used?

Thanks,
Les
 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      14th Jan 2008
> and how is code like "MultiPage1.Value = 0" used?

That code would activate the first page of a multipage control named
MultiPage1

The Index of the first page is zero, so to activate the last page you would
do this

MultiPage1.Value = MultiPage1.Count - 1

Afraid I don't really follow the rest of your question, revert back if the
above is not enough.

Regards,
Peter T


"WLMPilot" <(E-Mail Removed)> wrote in message
news:3EB455E7-BE4C-45BB-9348-(E-Mail Removed)...
> I have two books on Excel VBA and have googled "Multipage Tab" and I am

still
> in the dark about how to set things up when using this feature. I have
> already set up a userform using page1.
>
> The only reference I have made to page1 in my code is below:
>
> Private Sub UserForm_Initialize()
> MultiPage1.Value = 0
>
> There is no other reference made anywhere. As best as I can tell, all

pages
> would be initialized in this section. My code works fine, but I am at a

lost
> when I start to design other pages. I noticed when I view code from

page2,
> that all the code from page1 is brought up. Thus my confusion as to how

it
> is kept separate. Maybe only because the textboxes, combo/Listboxes, etc
> will increment. I assume I will not have a textbox1 on both pages.
>
> My question is where and when are references needed regarding multipage
> tabbing and how is code like "MultiPage1.Value = 0" used?
>
> Thanks,
> Les



 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      14th Jan 2008
Here is a little more info on the MultiPage.

When the multpage is added to a UserForm the Properties
Window shows the name MultiPage1, if it is the first one
added. Then, when you click the tab, Page1, the properties
window changes to show Page1, tab Page2 the properties
window shows page2. This means that each page has its own
properties, but the code module is for the MultiPage only.
The individual pages do not have their own code modules.
You must use a page index reference to control a specific
page: MultiPage1.Pages(0) would be page1.

To add a caption to page2 with code in the UserForm module:

Private Sub UserForm_Initialize()
MultiPage1.Pages(1).Caption = "Flight Plan"
End Sub

The MultiPage provides for event code and each control
which can be applied to individual pages by index number.
For example:

Private Sub MultiPage1_Click(1)
'Do something
End Sub

Would be a click event for page2 of the MultiPage.

Remember that the index number is always one less than
the page number.

"WLMPilot" wrote:

> I have two books on Excel VBA and have googled "Multipage Tab" and I am still
> in the dark about how to set things up when using this feature. I have
> already set up a userform using page1.
>
> The only reference I have made to page1 in my code is below:
>
> Private Sub UserForm_Initialize()
> MultiPage1.Value = 0
>
> There is no other reference made anywhere. As best as I can tell, all pages
> would be initialized in this section. My code works fine, but I am at a lost
> when I start to design other pages. I noticed when I view code from page2,
> that all the code from page1 is brought up. Thus my confusion as to how it
> is kept separate. Maybe only because the textboxes, combo/Listboxes, etc
> will increment. I assume I will not have a textbox1 on both pages.
>
> My question is where and when are references needed regarding multipage
> tabbing and how is code like "MultiPage1.Value = 0" used?
>
> Thanks,
> Les

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
tabbing to textboxes in multipage tab control =?Utf-8?B?RGFsZSBGeWU=?= Microsoft Excel Programming 0 21st Aug 2007 06:00 PM
new tabbing? =?Utf-8?B?SmFjayB8IENyb25pZXI=?= Windows Vista General Discussion 1 20th Jun 2006 10:32 PM
Tabbing Help =?Utf-8?B?QUNhdW50ZXI=?= Microsoft ASP .NET 1 15th Dec 2004 01:35 AM
Tabbing mark Microsoft Excel Programming 0 8th Jun 2004 04:12 PM
TABBING =?Utf-8?B?V0FMTFk=?= Microsoft Excel Worksheet Functions 1 23rd Nov 2003 10:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:15 AM.