Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 470
Default Confusion on Multipage Tabbing

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Confusion on Multipage Tabbing

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" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Confusion on Multipage Tabbing

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
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
MDI Confusion CMoya Excel Discussion (Misc queries) 1 February 21st 08 02:11 PM
tabbing to textboxes in multipage tab control Dale Fye Excel Programming 0 August 21st 07 06:00 PM
Subquery Confusion Diana[_7_] Excel Programming 0 April 10th 07 05:32 PM
Confusion..... Eric @ CMN, Evansville Excel Discussion (Misc queries) 2 December 27th 05 07:15 PM
Month day confusion VPH Excel Worksheet Functions 1 December 21st 05 02:38 PM


All times are GMT +1. The time now is 01:19 AM.

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"