View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Tabstrip Tabs Width

Darren,

Create a new userform, insert a tab strip, and then use the code below in the userform's module.
Each click on the userform will increase the tabwidth, and a double-click will reset it. See what
happens....

HTH,
Bernie
MS Excel MVP


Private Sub UserForm_Click()
UserForm1.TabStrip1.TabFixedWidth = UserForm1.TabStrip1.TabFixedWidth + 20
End Sub

Private Sub UserForm_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
UserForm1.TabStrip1.TabFixedWidth = 20
End Sub

Private Sub UserForm_Initialize()
Dim i As Integer
i = 1
With Me
.Width = 500
.Height = 500
With .TabStrip1
While .Tabs.Count < 5
.Tabs.Add "New tab" & i
i = i + 1
Wend
.MultiRow = True
.Width = 400
.Height = 400
.TabFixedWidth = 20
.Left = 50
.Top = 50
End With
End With
End Sub


"Darren Hill" wrote in message
...
I've Hi, Bernie.
I've tried fiddling around with the TabFixedWidth property but I must be doing something wrong -
as all but one of my tabs vanish when I use it.
Can you give a simple example of using the tabfixedwidth ?

I can't use the Control Tip, because the text box allows data entry.

Thanks for the suggestions, though.

Darren
Bernie Deitrick wrote:
Darren,

You could force the width to be a standard by using the TabFixedWidth property. Or just put the
textbox on the userform in a consistent location. Or use the Contril Tip Text of the tab to
contain your text.

HTH,
Bernie
MS Excel MVP


"Darren Hill" wrote in message
...
I'm using a Tabstrip control.
I would like to position a textbox just to the right of the rightmost visible tab.
Since the number and width of those tabs will vary, I need a way to figure out the current width
of all visible tabs.

Is this possible?

Thanks.

Darren