Use same command button/userform on multiple sheets

KGee

Well-known Member
Joined
Nov 26, 2008
Messages
526
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.
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Watch MrExcel Video

Forum statistics

Threads
1,122,841
Messages
5,598,390
Members
414,234
Latest member
grlevesq

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