Use same command button/userform on multiple sheets

KGee

Well-known Member
Joined
Nov 26, 2008
Messages
532
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a workbook with multiple sheets that I want to protect before sending out for feedback. Three of the five sheets in the workbook have a range of cells that will remain unlocked for users to input their feedback.

I'd like to know if there is a way to display the same command button on each of those three sheets to indicate whether the file is locked. Folks on the forum have already helped me with the code to loop through and lock each sheet in the file and update the label on the button to indicate whether it's protected or not. Is it possible to place the same button on the other sheets and have the text updated with the current status? I'm thinking I can move the code from the button into its own module and call it from each button, but I'm not sure how I would go about getting it to update the text on the other buttons to reflect the current status. Can the caption and forecolor options be changed for buttons that do not reside on the active sheet?

Ideally I would like to do the same with a userform. Is it possible to display the same userform on all three sheets and have it visible at all times?

Hopefully this makes sense.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,650
Messages
5,854,950
Members
431,689
Latest member
jacker01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top