ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Column password protection (https://www.excelbanter.com/excel-programming/413552-column-password-protection.html)

Anders

Column password protection
 
Hi,

Is it possible to protect columns in a spreadsheet with a password?

I would like to hide the contents in specific columns from unauthorized users.

Thanks!

Nigel[_2_]

Column password protection
 
You can not protect specific parts of you worksheet with a password. However
you can lock/unlock specific cells, including whole columns, that when the
worksheet is protected (with or without a password); they can/cannot be
selected and /or edited.

You can of course hide a column which is very different to the above, if you
hide and then protect the sheet you cannot unhide.

I guess if you do not want the user to see the contents, then hide is the
best option.

The following will hide column E and then protect the sheet, (you can of
course do this manually without using a macro)

With Sheets("Sheet1")
.Columns("E:E").EntireColumn.Hidden = True
.Protect Password:="myPassword"
End With


--

Regards,
Nigel




"Anders" wrote in message
...
Hi,

Is it possible to protect columns in a spreadsheet with a password?

I would like to hide the contents in specific columns from unauthorized
users.

Thanks!




All times are GMT +1. The time now is 01:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com