Macro to Hide column and another to unhide (WITH PASSWORD)

SelinaR

Board Regular
Joined
Feb 2, 2012
Messages
65
Office Version
  1. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
Afternoon boffins...

I have recorded a macro to hide and unhide a column, however I need to supercharge it...

MACRO:
On Sheet 2, to hide & another to unhide Column "U"
1. Hide column U
2. Unhide column U with a password... (hiding column & protecting the sheet wasn't a viable option)
I would also prefer a keyboard shortcut ctrl+h (hide) and ctrl+s (show) rather than a button (if possible)

I have tired a few examples on the site, but get run time errors and issues.

thanks in advance....
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
unless the sheet is protected any column could be unhidden. You don't have to lock every cell if you need some cells to allow edit while it is protected.
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,576
Members
448,972
Latest member
Shantanu2024

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