Macro to hide/unhide columns in multiple worksheets and protect/hide on close

nfs001

New Member
Joined
Jan 24, 2018
Messages
6
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hello

I have limited knowledge with macros so would appreciate any advice you can give me.

I have a Workbook that has several users - most only need to view the Workbook, others need to edit certain columns. I would the columns that need to be edited hidden on opening and only visible once you have unprotected/unhidden them. I don't want anyone to just be able to open the Workbook and unhide the columns, so I'm guessing I need to password protect the Worksheets?

I have 4 Worksheets in the Workbook that contain identical data on each sheet (worksheets are called "2018", "2017", "2016" and "2015"). I would like columns I and L to be hidden on all sheets when the spreadsheet is opened and only unhidden when they need to be edited by certain users. I don't mind if columns I and L are unhidden on all 4 Worksheets at once.

I'm also slightly concerned that a User could accidentally save the Workbook without re-hiding the columns after they have made their changes so I'm not sure if there is a way to hide/protect the document automatically on close/save?

Hope this makes sense.

Thanks!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,214,650
Messages
6,120,734
Members
448,987
Latest member
marion_davis

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