VB初学者疑问,第四问

将初始化中用代码创建的text控件。在运行时输入的值,如何获取。
1,声明带事件的控件
Dim WithEvents text111 As TextBox, WithEvents text112 As TextBox, WithEvents text113 As TextBox
2,初始化中用代码生成textbox,以下内容在初始化中
For i = 11 To 16
For j = 1 To 3
Dim TEXT As Object
Set TEXT = Me.Controls.Add("VB.Textbox", "text" & i & j, Frame1)
With TEXT
.Visible = True
.Enabled = True
.Top = a + b * (i - 10)
.Left = 500 + 1000 * j
.Width = c
.Height = d
End With
Next
Next
3,在click事件中
Private Sub Command1_Click()
If Len(text113.TEXT) < 6 Then
MsgBox "你的邮政编码不是6位,请输入完整!", 0, "提示"
End If
End Sub
4,运行结果,click时
实时错误91
对象变量或with块变量未设置。