xlVeryHidden & error 1004

Lost Paul
StarLounger
Posts: 56
Joined: 10 Oct 2019, 09:43

xlVeryHidden & error 1004

Post by Lost Paul »

I think I've tried to be too clever & shot myself in the foot.

Set up a file where a couple of sheets become VeryHidden & included password protection at file level.
This produced a "Run-time error 1004".

Removed the file level password, but still no joy.
Now I'm not able change the 'visibility' of any sheet in VBA, be that to hide or make visible.

Any thoughts on resolution?

User avatar
HansV
Administrator
Posts: 74155
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: xlVeryHidden & error 1004

Post by HansV »

Activate the Review tab of the ribbon.
Is the 'Protect Workbook' button highlighted?
If so, click that button and provide the password if necessary.
Regards,
Hans

Lost Paul
StarLounger
Posts: 56
Joined: 10 Oct 2019, 09:43

Re: xlVeryHidden & error 1004

Post by Lost Paul »

Doh!

Missed that.
Time to try again.

Thank you