ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform TabStrip questions (https://www.excelbanter.com/excel-programming/405154-userform-tabstrip-questions.html)

Trefor

Userform TabStrip questions
 
I am trying to design a form and I am using a TabStrip. Depending on what my
code determines I would like to set the number of tabs in the code.

Is it possible to Enable / Make visible a single tab on a TabStrip?

Is it possible to add or remove a single tab on a TabStrip?

--
Trefor

Jon Peltier

Userform TabStrip questions
 
To test this I created a userform, added a tab strip and two command
buttons. One button adds a new tab at the end, the other removes the last
tab. Here is the code for the buttons:

Private Sub AddButton_Click()
Me.TabStrip1.Tabs.Add
End Sub

Private Sub SubtractButton_Click()
If Me.TabStrip1.Tabs.Count 1 Then
Me.TabStrip1.Tabs.Remove Me.TabStrip1.Tabs.Count - 1
End If
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Trefor" wrote in message
...
I am trying to design a form and I am using a TabStrip. Depending on what
my
code determines I would like to set the number of tabs in the code.

Is it possible to Enable / Make visible a single tab on a TabStrip?

Is it possible to add or remove a single tab on a TabStrip?

--
Trefor




Trefor

Userform TabStrip questions
 
Jon,

Excellent just what I needed, many thanks.

Trefor

--
Trefor


"Jon Peltier" wrote:

To test this I created a userform, added a tab strip and two command
buttons. One button adds a new tab at the end, the other removes the last
tab. Here is the code for the buttons:

Private Sub AddButton_Click()
Me.TabStrip1.Tabs.Add
End Sub

Private Sub SubtractButton_Click()
If Me.TabStrip1.Tabs.Count 1 Then
Me.TabStrip1.Tabs.Remove Me.TabStrip1.Tabs.Count - 1
End If
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Trefor" wrote in message
...
I am trying to design a form and I am using a TabStrip. Depending on what
my
code determines I would like to set the number of tabs in the code.

Is it possible to Enable / Make visible a single tab on a TabStrip?

Is it possible to add or remove a single tab on a TabStrip?

--
Trefor






All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com