PC Review


Reply
Thread Tools Rate Thread

Command button naming issue

 
 
Ken Warthen
Guest
Posts: n/a
 
      30th Mar 2010
In an Excel 2007 workbook I have a worksheet with several command buttons on
it. I use somewhat wordy names for my command buttons, e.g.,
cmdEBITLessThanZeroGreaterThanNegativeOneHundred. I'm now having a problem
where the command button name is not saving properly. In edit view I can
double click on the command button and it will open the editor to the routine
for that button. I save the workbook, close it, and open it again. Now if I
double click on the command button in edit view it opens another routine
called cmdEBIT_Click with no code listed in the routine. This really has me
baffled. Is there a limit to the length of a command button name?

Ken
 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      31st Mar 2010
Although it seems possible to give an ActiveX control a long name in
properties, the limit for Objects names in general is 31, eg sheets, shapes
etc. You couldn't say give a long name to the control in the Names box left
of the input bar.

Maybe a bit more economy in your naming, eg

cmdEBITLessThanZeroGreaterThanNegativeOneHundred
vs
cmdEBIT_0toNeg100
maybe with some other key to denote the less/more than's if really necessary

Don't forget you can always include additional info in the comments

Regards,
Peter T



"Ken Warthen" <(E-Mail Removed)> wrote in message
news:9CD495F4-E1AE-4ECB-8754-(E-Mail Removed)...
> In an Excel 2007 workbook I have a worksheet with several command buttons
> on
> it. I use somewhat wordy names for my command buttons, e.g.,
> cmdEBITLessThanZeroGreaterThanNegativeOneHundred. I'm now having a
> problem
> where the command button name is not saving properly. In edit view I can
> double click on the command button and it will open the editor to the
> routine
> for that button. I save the workbook, close it, and open it again. Now
> if I
> double click on the command button in edit view it opens another routine
> called cmdEBIT_Click with no code listed in the routine. This really has
> me
> baffled. Is there a limit to the length of a command button name?
>
> Ken



 
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
Delete Command Button Issue scott04 Microsoft Access Forms 2 3rd Jan 2008 02:58 PM
Command Button Naming Tanya Microsoft Excel Programming 23 5th Dec 2007 06:33 AM
Command Button Issue JK Microsoft Excel Programming 1 4th Dec 2004 06:12 AM
Need help with Command Bar Button issue ?? =?Utf-8?B?RGFuIFRob21wc29u?= Microsoft Excel Programming 3 20th Oct 2004 12:08 AM
Command Button Issue James Microsoft Access Form Coding 0 17th Apr 2004 11:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:47 PM.