I'm trying to add ActiveX controls to my worksheet. Here are the lines of code that I think are relevant. If I run my procedure, I receive the following error: “Can’t enter break mode at this time.” Then, I click Continue and another error message appears. “Run-time error ‘438’: Object doesn’t support this property or method.”
Also, I'm adding ActiveX controls instead of form controls, because I need to be able to edit the font sizes.
Any help is much appreciated.
Dim objOLE As OLEObject
Set objOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextBox.1", Link:=False, _
DisplayAsIcon:=False, Left:=UsedLMargin1 + BoxWidth + 10, Top:=CumulativeTop, Width:=100, Height:=BoxHeight)
Also, I'm adding ActiveX controls instead of form controls, because I need to be able to edit the font sizes.
Any help is much appreciated.
Dim objOLE As OLEObject
Set objOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextBox.1", Link:=False, _
DisplayAsIcon:=False, Left:=UsedLMargin1 + BoxWidth + 10, Top:=CumulativeTop, Width:=100, Height:=BoxHeight)