

Option Explicit
Dim WithEvents TextBox2 As TextBox
Private Sub Form_Load()
Set TextBox2 = Me.Controls.Add("VB.TextBox", "TextBox2")
TextBox2.Width = 300
TextBox2 = "You can't type here anything
"
TextBox2.Visible = True
End Sub
Private Sub TextBox2_Change()
TextBox2 = "You can't type here anything
"
End Sub

Option Explicit
Dim WithEvents TextBox2 As TextBox
'' Просто запихиваешь этот код в комманд контрол
Private Sub Command1_Click()
Set TextBox2 = Me.Controls.Add("VB.TextBox", "TextBox2")
TextBox2.Width = 300
TextBox2 = "You can't type here anything
"
TextBox2.Visible = True
End Sub
Private Sub TextBox2_Change()
TextBox2 = "You can't type here anything
"
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 2