Dynamically Adding Textbox Control To Frame Object in VBA (Workshe

S

sarndt

How do I add a textbox control to a frame object (declared as OLEObject) in
vba code behind a worksheet?

For example, I have tried the following that doesn't work...

Dim objFrame As OleObject
Set objFrame = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Frame.1")
With objFrame
.Object.Controls.Add ClassType:="Forms.Textbox.1"
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top