PDA

View Full Version : [SOLVED] Tab Column in VBA Form



sheeeng
06-13-2005, 09:35 PM
Is there a possibility that Tab Column implemented in VBA Form? :doh:

Thanks. :friends:

Bob Phillips
06-14-2005, 01:49 AM
Is there a possibility that Tab Column implemented in VBA Form?

Can you expand on what you mean?

sheeeng
06-14-2005, 02:09 AM
What i mean is how to use MultiPage object in Excel VBA.
Have a look in the attachment. Then the idea will be much clearer...
Thanks.

How to switch MultiPage1 (Page1 - > Page2)?
How do we refer to button on Page1 (Button1) and Page2 (Button2) ?
Thanks. :friends:

Bob Phillips
06-14-2005, 02:29 AM
Here is some code that can tab back between pages, regardless of how many there are



With MultiPage1
If .Value > 0 Then
.Value = .Value - 1
End If
End With

and forward


With MultiPage1
If .Value < .Pages.Count - 1 Then
.Value = .Value + 1
End If
End With


To refer to a button on the tab itself, you can just refer to the button as normal


MsgBox Me.CommandButton3.Caption

or you can fully qualify it


MsgBox Me.MultiPage1.Pages(0).CommandButton3.Caption

Don't forget the page index starts at 0, so Page1 is Pages(0).

sheeeng
06-14-2005, 10:58 PM
Thanks, xld (http://www.vbaexpress.com/forum/member.php?u=2139). You make this thread solved!

sheeeng
07-04-2005, 11:49 PM
Anyone know how to lock or disable multipages on Excel VBA form?
Or hide it maybe when some option button is selected?

Thx :friends:

Justinlabenne
07-05-2005, 12:15 AM
Look at the properties set with the commandbuttons on the forms, that is how you switch the tab style around, the multi page does not disapear, it just has no tabs.

There are other methods you can use to "grey" out the tabs, but couldn't find the example right off....