View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Custom button behaviour (activation and deactivation)

David,

You need the State property

With Application.CommandBars.ActionControl
.State = Not .State
End With


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"David Torrejón" wrote in message
oups.com...
Hello all,

I would like to add a custom button to an Excel toolbar (Excel 2003)
that could switch between activated and deactivated mode, that is to
say, the same behaviour as Bold, Align Left, Align Center, etc.
buttons, that remain pressed when the functionality is active.

Do you know whether it is possible?

Many thanks in advance


David Torrejón
Madrid, Spain