From: Ken Warthen on
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
From: Peter T on
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" <KenWarthen(a)discussions.microsoft.com> wrote in message
news:9CD495F4-E1AE-4ECB-8754-EB846EA1EEAB(a)microsoft.com...
> 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