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

i have an option button on my worksheet to protect/unprotect all sheets.
when a different/nonrelated macro is run i want it automatically select the
"protect" option button (OptionButton1) when it is finished. this has to be
simple but i just cannot figure it out. any ideas? thanks for your help!

-josh
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default option button question

I don't think you need to select the button itself, but what you can do is
call at the end of the unrelated macro the execution of the code to
protect/unprotect sheets

Call ProtectSheet


--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"JoshC" wrote:

i have an option button on my worksheet to protect/unprotect all sheets.
when a different/nonrelated macro is run i want it automatically select the
"protect" option button (OptionButton1) when it is finished. this has to be
simple but i just cannot figure it out. any ideas? thanks for your help!

-josh

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default option button question

Hi Josh,

Turning on an ActiveX option button:-

Sheets("Sheet1").OptionButton1.Value = True

Turning on a Forms option button:-

Sheets("Sheet1").OptionButtons("Option Button 2") = True

Regards,

OssieMac


"JoshC" wrote:

i have an option button on my worksheet to protect/unprotect all sheets.
when a different/nonrelated macro is run i want it automatically select the
"protect" option button (OptionButton1) when it is finished. this has to be
simple but i just cannot figure it out. any ideas? thanks for your help!

-josh

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default option button question

thanks Ossie, i need to turn on the button for the sake of others using the
worksheet and this works wonderfully!

"OssieMac" wrote:

Hi Josh,

Turning on an ActiveX option button:-

Sheets("Sheet1").OptionButton1.Value = True

Turning on a Forms option button:-

Sheets("Sheet1").OptionButtons("Option Button 2") = True

Regards,

OssieMac


"JoshC" wrote:

i have an option button on my worksheet to protect/unprotect all sheets.
when a different/nonrelated macro is run i want it automatically select the
"protect" option button (OptionButton1) when it is finished. this has to be
simple but i just cannot figure it out. any ideas? thanks for your help!

-josh

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
option button and userform question Shawn Excel Programming 1 June 29th 07 12:51 AM
need help on how to grey out one option button in one group box based on the selection of another option button in another group box George Excel Programming 12 March 11th 07 02:08 PM
Excel VBA option button question CindyG Excel Programming 2 June 5th 06 03:52 PM
VBA Option Button question harpscardiff[_21_] Excel Programming 8 March 2nd 06 02:29 PM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM


All times are GMT +1. The time now is 10:32 AM.

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

About Us

"It's about Microsoft Excel"