Use same command button/userform on multiple sheets

KGee

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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,214,851
Messages
6,121,931
Members
449,056
Latest member
denissimo

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
Back
Top