
Originally Posted by
June7
You would not rename the pages of the tab control, but would change the Caption property. This could get complicated.
Yes, I tried something like this to add new page from "+" button
Code:
Private Sub GroupTab_Change() Dim i As Integer
Dim intCounter As Integer
Dim arrCount(1 To 10) As Long
Dim max As Integer
Dim nextpage As Integer
cnt = Me.GroupTab.Pages.Count
intCounter = 1
For i = 1 To cnt
If Me.GroupTab.Pages(i - 1).Visible = True And Me.GroupTab.Pages(i - 1).Caption <> "+" Then
arrCount(intCounter) = i - 1
intCounter = intCounter + 1
End If
Next i
max = 0
For i = 1 To intCounter
If Not IsNull(arrCount(i)) Then
max = max + 1
End If
Next i
nextpage = Me.GroupTab.Value + 1
Me.GroupTab.Pages(nextpage).Visible = True
Me.GroupTab.Pages(nextpage).Caption = "+"
Me.GroupTab.Pages(Me.GroupTab.Value).Caption = "Group " & max
End Sub
It works for now