Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default ToggleButton Value in a macro

I can use this code when using a Private Sub ToggleButton1_Click().

Me.ToggleButton1.Value = False

However, I'm trying to use this in a standard Sub routine. When attempting
it that way, it gives me an error.

How do I use this in a standard Sub routing?

Thanks,
Paul


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default ToggleButton Value in a macro

in a sheet module, me refers to that sheet. In a general module, you would
have to specify the sheet that contains the toggle

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

--
Regards,
Tom Ogilvy


"PCLIVE" <pclive(remove wrote in message
...
I can use this code when using a Private Sub ToggleButton1_Click().

Me.ToggleButton1.Value = False

However, I'm trying to use this in a standard Sub routine. When
attempting it that way, it gives me an error.

How do I use this in a standard Sub routing?

Thanks,
Paul



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default ToggleButton Value in a macro

Thanks Tom,

I thought I had tried using the 'ActiveSheet' method, but I guess not.
Thanks for clearing up the usage of Me.
Works great now.

Thanks again.
Paul

"Tom Ogilvy" wrote in message
...
in a sheet module, me refers to that sheet. In a general module, you
would have to specify the sheet that contains the toggle

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

--
Regards,
Tom Ogilvy


"PCLIVE" <pclive(remove wrote in message
...
I can use this code when using a Private Sub ToggleButton1_Click().

Me.ToggleButton1.Value = False

However, I'm trying to use this in a standard Sub routine. When
attempting it that way, it gives me an error.

How do I use this in a standard Sub routing?

Thanks,
Paul





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
Setting ToggleButton Value fazstp[_4_] Excel Programming 6 February 1st 06 04:31 AM
hide rows with macro/togglebutton huntermcg Excel Programming 22 October 14th 05 08:41 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 05:34 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"