I have written quite and extensive macro that takes data from many Excel files and creates a summary of them. The problem is that there needs to be no hidden columns in the master files or the summary prints misinformation. I am looking for a way to keep people from hiding any columns (and rows if possible) unless they have a password. The problem is that many people have to get into the masters to update data, so I can't just put a password on the files and be done with it. Anyone know how to just allow certain people access to hiding/unhiding columns and rows? Thanks.
Locking Columns
-
-
-
Re: Locking Columns
Hi,
You could use a worksheet change event to check if the column widths for each of your columns remain unaltered. If they've changed, close without saving (they'd soon learn)
or you could use a before_print or before_save event to reset the column widths to the widths you want.
I am unsure if there is a way you can protect the column width.
John
-
Re: Locking Columns
You could also utilize menu:Tools\Protection\Allow Users to Edit Ranges... Define the ranges that you want them to edit (with no password) and then when you protect the sheet lock everything else down.
-
Re: Locking Columns
Couldn't you just protect the sheet, with only the 'format columns' and 'insert column' not checked? Then you wouldnt have to name a bunch of ranges.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!