PC Review


Reply
Thread Tools Rate Thread

Custom button behaviour (activation and deactivation)

 
 
=?iso-8859-1?q?David_Torrej=F3n?=
Guest
Posts: n/a
 
      10th Jul 2007
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

 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      10th Jul 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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


 
Reply With Quote
 
=?iso-8859-1?q?David_Torrej=F3n?=
Guest
Posts: n/a
 
      10th Jul 2007
Thanks Bob,

I'm creating a simple example, changing the
CommandBars.ActionControl.State property to msoButtonDown, but when
the procedure finishes the button does not remain pressed. Is this the
normal behaviour?

Regards

On Jul 10, 8:05 pm, "Bob Phillips" <bob....@somewhere.com> wrote:
> 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" <david.torre...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
=?iso-8859-1?q?David_Torrej=F3n?=
Guest
Posts: n/a
 
      11th Jul 2007
I'm analyzing using the Watch Window and when I assing the
msoButtonDown to the ...ActionControl.State property the value does
not change, and the msoButtonUp value remains. However, if other
properties like the Caption does change.

Do you know if this property could be locked for some reason?

Thanks again
On Jul 10, 8:50 pm, David Torrejón <david.torre...@gmail.com> wrote:
> Thanks Bob,
>
> I'm creating a simple example, changing the
> CommandBars.ActionControl.State property to msoButtonDown, but when
> the procedure finishes the button does not remain pressed. Is this the
> normal behaviour?
>
> Regards
>
> On Jul 10, 8:05 pm, "Bob Phillips" <bob....@somewhere.com> wrote:
>
> > 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" <david.torre...@gmail.com> wrote in message

>
> >news:(E-Mail Removed)...
> > 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



 
Reply With Quote
 
=?Utf-8?B?RGFubnk=?=
Guest
Posts: n/a
 
      18th Aug 2007
I'm trying to do the same thing David. It appears that the State is
read-only. Have you figured out a fix?

Thanks
Danny

"David Torrejón" wrote:

> I'm analyzing using the Watch Window and when I assing the
> msoButtonDown to the ...ActionControl.State property the value does
> not change, and the msoButtonUp value remains. However, if other
> properties like the Caption does change.
>
> Do you know if this property could be locked for some reason?
>
> Thanks again
> On Jul 10, 8:50 pm, David Torrejón <david.torre...@gmail.com> wrote:
> > Thanks Bob,
> >
> > I'm creating a simple example, changing the
> > CommandBars.ActionControl.State property to msoButtonDown, but when
> > the procedure finishes the button does not remain pressed. Is this the
> > normal behaviour?
> >
> > Regards
> >
> > On Jul 10, 8:05 pm, "Bob Phillips" <bob....@somewhere.com> wrote:
> >
> > > 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" <david.torre...@gmail.com> wrote in message

> >
> > >news:(E-Mail Removed)...
> > > 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

>
>
>

 
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
RE: Vista activation / deactivation issue Darrell Gorter[MSFT] Windows Vista Installation 0 26th Jun 2009 11:39 PM
Vista Deactivation/Activation =?Utf-8?B?c2NvcmNoaW9sZWU=?= Windows Vista General Discussion 20 24th Oct 2007 06:58 PM
Upgrading PC Activation / Deactivation =?Utf-8?B?RGVubmlz?= Windows Vista Installation 3 30th Mar 2007 05:21 PM
Command line activation/deactivation Rolfie Windows XP Networking 1 27th Aug 2005 10:56 AM
Modify custom toolbar button behaviour =?Utf-8?B?Um9iZXJ0IFdlcm5lcg==?= Microsoft Word Document Management 1 13th Aug 2005 04:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:49 AM.