PDA

Click to See Complete Forum and Search --> : Tabstrip


turfbult
Aug 15th, 2000, 04:08 PM
I'm battling to assign caption to a tab in my tabstrip in runtime!!

What I do is get 2 dates and then calculate the no of days between the 2 dates - now I go into a loop (no of days times) and for each day add a tab to my tabstrip - I now also want to assign caption to the tab - any help please!!

Here is my code.... I am trying to name each tab to the corresponding day!!

Private Sub Form_Load()
'thru a previous procedure I already know how many days there are

Dim intTabs As Integer
While intNoOfDays > intTabs
TabStrip1.Tabs.Add
intTabs = intTabs + 1
'This line does not work to add the caption!!
TabStrip1.Tabs.Item.Caption = intTabs
Wend

End Sub

parksie
Aug 15th, 2000, 04:14 PM
Try the CStr() statement.

turfbult
Aug 15th, 2000, 04:29 PM
Parksie - how about another clue???

I'm sorry but I dont know what you mean!!

parksie
Aug 15th, 2000, 04:36 PM
How about this:

TabStrip1.Tabs(intTabs).Caption = CStr(intTabs)