The 'Invalid use of property' error is caused by:
Private Function TStrip1_(ByRef,ByVal TStrip1) As Integer
You specified ByRef AND ByVal for the argument. Changing that line to:
Private Function TStrip1_(TStrip1) As Integer
should remove that error.
I would, however, rewrite your code like so:
Option Explicit 'always use option explicit (just do)
Private Function IsValid(numIn As Variant) As Boolean
Dim n As Long
n = Val(numIn) 'cast to long
'check if n is between 1 and 15:
If n > 0 And n < 16 Then
IsValid = True
Else
IsValid = False
End If
End Function
Private Sub TextBox1_Change()
Dim ValidNum As Long
If IsValid(Me.TextBox1.Value) Then
ValidNum = Val(Me.TextBox1.Value)
Else
Exit Sub
End If
Call AdjTabs(ValidNum)
End Sub
Private Sub AdjTabs(n As Long)
Dim i As Long
If Me.TabStrip1.Tabs.Count = n Then
Exit Sub
ElseIf Me.TabStrip1.Tabs.Count < n Then
For i = Me.TabStrip1.Tabs.Count To n - 1
Me.TabStrip1.Tabs.Add
Next i
Else
For i = Me.TabStrip1.Tabs.Count To n + 1 Step -1
Me.TabStrip1.Tabs.Remove (Me.TabStrip1.Tabs.Count - 1)
Next i
End If
End Sub
only thing left is to change the tabs names, but that's up to you now. I'm sure you can figure that out.