Hi,

A problem with the textbox class. Add a class to a vb project called CText and enter this code.

Public Sub Add()
Dim newText As TextBox
Set newText = Controls.Add("VB.Textbox", "newText")
With newText
.Visible = True
.Text = "&Dynamically Added Button"
.Top = 0
.Left = 0
.Width = 2400
.Height = 500
End With
End Sub

And then add a form. On the form add this.

Dim nObj As New CText

Public Sub Form_Load()
nObj.Add
End Sub


When irun the project vb gives me an error 424, object required, why does this not work ?

[Edited by PsyVision on 11-23-2000 at 01:58 PM]