Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Togglebutton

Is there a code that turns a toggle button on and off?
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Togglebutton

hi
not sure what you mean exactly by on/off but maybe
on
togglebutton1.enabled = true
off
togglebutton1.enabled = false

post back to clairfy if i misunderstood.

Regards
FSt1


"ranswrt" wrote:

Is there a code that turns a toggle button on and off?
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Togglebutton

I was looking for a code that would change it from sunken to raised. When it
is sunken it would be on and raised it would be off. I inserted
togglebuttons on my worksheet using the control toolbox

"FSt1" wrote:

hi
not sure what you mean exactly by on/off but maybe
on
togglebutton1.enabled = true
off
togglebutton1.enabled = false

post back to clairfy if i misunderstood.

Regards
FSt1


"ranswrt" wrote:

Is there a code that turns a toggle button on and off?
Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Togglebutton

I would think you could just do this to "sink" it...

Worksheets("Sheet1").ToggleButton1.Value = True

where you would change the worksheet reference to you actual worksheet name
and, if you didn't use the default name for the ToggleButton, change it
also. By the way, setting the Value property to False to "raise" it.

Rick


"ranswrt" wrote in message
...
I was looking for a code that would change it from sunken to raised. When
it
is sunken it would be on and raised it would be off. I inserted
togglebuttons on my worksheet using the control toolbox

"FSt1" wrote:

hi
not sure what you mean exactly by on/off but maybe
on
togglebutton1.enabled = true
off
togglebutton1.enabled = false

post back to clairfy if i misunderstood.

Regards
FSt1


"ranswrt" wrote:

Is there a code that turns a toggle button on and off?
Thanks


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Togglebutton

thank you

"Rick Rothstein (MVP - VB)" wrote:

I would think you could just do this to "sink" it...

Worksheets("Sheet1").ToggleButton1.Value = True

where you would change the worksheet reference to you actual worksheet name
and, if you didn't use the default name for the ToggleButton, change it
also. By the way, setting the Value property to False to "raise" it.

Rick


"ranswrt" wrote in message
...
I was looking for a code that would change it from sunken to raised. When
it
is sunken it would be on and raised it would be off. I inserted
togglebuttons on my worksheet using the control toolbox

"FSt1" wrote:

hi
not sure what you mean exactly by on/off but maybe
on
togglebutton1.enabled = true
off
togglebutton1.enabled = false

post back to clairfy if i misunderstood.

Regards
FSt1


"ranswrt" wrote:

Is there a code that turns a toggle button on and off?
Thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with togglebutton that displays jpg caj Excel Discussion (Misc queries) 2 March 7th 07 02:44 PM
ToggleButton Value in a macro PCLIVE Excel Programming 2 September 21st 06 01:30 PM
Setting ToggleButton Value fazstp[_4_] Excel Programming 6 February 1st 06 04:31 AM
need help with togglebutton Gary Keramidas[_2_] Excel Programming 7 July 9th 05 04:15 PM
2 macros in a Togglebutton? Jorge[_2_] Excel Programming 1 August 11th 03 01:57 AM


All times are GMT +1. The time now is 02:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"