I have a very simple code which runs without errors when run from inside VBA , using F5 command.
Nevertheless if I try to run the code stept by step using F8 even though it inserts the object it throws the message "Can't enter break mode at this time" and this bothers me because I want to debug the code and I can not do it.
I have isolated the code in order for your help:
Sub Macro1()
Set objWorkbook = ActiveWorkbook Set ob = objWorkbook.ActiveSheet.OLEObjects
ob.Add(ClassType:="Forms.TextBox.1", Link:=False, _
DisplayAsIcon:=False, Left:=67.5, Top:=54, Width:=177.75, Height:= _
35.25).Select
End Sub