View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tony tony is offline
external usenet poster
 
Posts: 313
Default Changing Control Object Name( command buttons etc ) from VBA code

When I use the following code the object name gets changed, but generates an
error message.

Sub testit()
ActiveSheet.OLEObjects("CommandButton1").Name = "newname"
End Sub

ERROR MESSAGE:

MICROSOFT VISUAL BASIC
" Can't enter break mode at this time"

Any