Private
bytTB
As
Byte
Private
intHeight
As
Integer
Private
Sub
UserForm_Activate()
bytTB = 2
intHeight = 0.875 *
Me
.Height
With
Me
.KeepScrollBarsVisible = fmScrollBarsNone
.ScrollBars = fmScrollBarsNone
.ScrollHeight = intHeight
End
With
End
Sub
Private
Sub
CommandButton1_Click()
With
Me
.Controls.Add
"Forms.TextBox.1"
,
"tbEingabe"
&
CStr
(bytTB),
True
If
bytTB > 1
Then
With
.Controls(
"tbEingabe"
&
CStr
(bytTB))
.Top =
Me
.Controls(
"tbEingabe"
&
CStr
(bytTB - 1)).Top + 20
.Left =
Me
.Controls(
"tbEingabe"
&
CStr
(bytTB - 1)).Left
End
With
If
.Controls(
"tbEingabe"
&
CStr
(bytTB)).Top + .Controls(
"tbEingabe"
&
CStr
(bytTB)).Height >= intHeight
Then
.KeepScrollBarsVisible = fmScrollBarsBoth
.ScrollBars = fmScrollBarsVertical
.ScrollHeight = .ScrollHeight + 20
End
If
End
If
bytTB = bytTB + 1
End
With