|
-
Nov 23rd, 2000, 01:55 PM
#1
Thread Starter
Frenzied Member
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]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|