PC Review


Reply
Thread Tools Rate Thread

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

 
 
TONY
Guest
Posts: n/a
 
      29th Nov 2007
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




 
Reply With Quote
 
 
 
 
Nigel
Guest
Posts: n/a
 
      29th Nov 2007
ActiveSheet.CommandButton1.Name = "newname"

--

Regards,
Nigel
(E-Mail Removed)



"TONY" <(E-Mail Removed)> wrote in message
news:E565DE10-3126-4A5E-A0A3-(E-Mail Removed)...
> 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
>
>
>
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form buttons and Control Command Buttons ranswrt Microsoft Excel Programming 0 7th Aug 2008 11:36 PM
Changing BackColor on Command Buttons? =?Utf-8?B?UkJlZQ==?= Microsoft Excel Misc 1 30th Aug 2006 02:32 AM
Command Buttons changing size! =?Utf-8?B?ZGNzdGVjaA==?= Microsoft Excel Programming 2 18th Mar 2004 03:46 AM
Changing the color of Command Buttons James Microsoft Access Getting Started 2 8th Jan 2004 02:31 PM
Control Buttons vs. Command Buttons Robert Gibson Microsoft Excel Programming 1 13th Oct 2003 04:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:20 PM.