I'm trying to add a text box to a userform using VBA. So far it is not working.
Here's what I got from searching the interwebs:
This is presumably giving me a textbox, but I'm not able to do anything with it. I can't seem to edit the text or anything. And I'd prefer for it to be an actual "TextBox" object in VBA, so I can see all the properties that I can manipulate and so forth... the "control" object doesn't have a "Text" property, for example.
Here's what I got from searching the interwebs:
Code:
Dim cCntrl As Control
Set cCntrl = Me.Controls.Add("Forms.TextBox.1", "MyTextBox", True)
With cCntrl
.Width = 150
.Height = 25
.Top = 10
.Left = 10
.ZOrder (0)
End With
This is presumably giving me a textbox, but I'm not able to do anything with it. I can't seem to edit the text or anything. And I'd prefer for it to be an actual "TextBox" object in VBA, so I can see all the properties that I can manipulate and so forth... the "control" object doesn't have a "Text" property, for example.