ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro - Playing Macro if cells are locked (https://www.excelbanter.com/excel-programming/296929-macro-playing-macro-if-cells-locked.html)

sonar[_5_]

Macro - Playing Macro if cells are locked
 
Hi

I want to create a macro to hide and unhide certain columns with "F
keys.

Will it work when most of my cells are locked and password protected?

Thanks

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Macro - Playing Macro if cells are locked
 
Sub MyMacro()
ActiveSheet.Unprotect Password:="ABCD"
' recorded code
Activesheet.Protect Password:="ABCD"
End Sub

--
Regards,
Tom Ogilvy


"sonar " wrote in message
...
Hi

I want to create a macro to hide and unhide certain columns with "F"
keys.

Will it work when most of my cells are locked and password protected?

Thanks.


---
Message posted from http://www.ExcelForum.com/





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

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