Greetings all,
I found the below code through Mr Excel. It was originally set up for unhiding columns but I modified it to do the same with rows. It was working when the worksheet itself was not protected, but when I add protection and enter the password ("ok") I receive a Run time error 1004...Unable to set Hidden property of the range class.
It obviously has something to do with the worksheet protection but I need to have it that way. How can I resolve this issue?
Thanks
I found the below code through Mr Excel. It was originally set up for unhiding columns but I modified it to do the same with rows. It was working when the worksheet itself was not protected, but when I add protection and enter the password ("ok") I receive a Run time error 1004...Unable to set Hidden property of the range class.
It obviously has something to do with the worksheet protection but I need to have it that way. How can I resolve this issue?
Thanks
Code:
ShowPword = InputBox("Enter password to show hidden data")
If ShowPword = "" Then Exit Sub
If ShowPword <> "ok" Then MsgBox "Incorrect password...": Exit Sub 'Replace 'ok' with your real password
Range("6:6, 8:8, 10:10, 12:12,14:14,16:16,18:18,20:20,22:22,24:24,26:26,28:28,30:30,32:32,34:34,36:36,38:38,40:40,42:42,44:44,46:46,48:48,50:50,52:52,54:54,56:56,58:58").EntireRow.Hidden = False