Changing Control Object Name( command buttons etc ) from VBA code

  • Thread starter Thread starter TONY
  • Start date Start date
T

TONY

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
 

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

Back
Top