ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dynamically Adding Textbox Control To Frame Object in VBA (Workshe (https://www.excelbanter.com/excel-programming/440654-dynamically-adding-textbox-control-frame-object-vba-workshe.html)

sarndt

Dynamically Adding Textbox Control To Frame Object in VBA (Workshe
 
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



All times are GMT +1. The time now is 01:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com