ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   option button question (https://www.excelbanter.com/excel-programming/396853-option-button-question.html)

JoshC

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

Michael

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


OssieMac

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


JoshC

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



All times are GMT +1. The time now is 02:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com