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
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