I am trying to create activex textbox and that part is OK. What I am stuck at is how to fill the created textbox
This is my try that failed at the last line
Code: Select all
Sub Test()
Dim oTextBox As OLEObject
Set oTextBox = ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextBox.1")
With oTextBox
.Name = "TextBox1"
.Left = 400
.Width = 200
.Height = 300
End With
ActiveSheet.TextBox1.Value = "Hello"
End Sub