Run time error "1004" - Excel protection error interfering with VBA hiding/unhiding columns

Rick Lichtenfield 21 Reputation points
2021-12-15T21:40:36.083+00:00

I have protection on my worksheet and I am getting an error. Is there a way for me to have protection on and still use the macro to protect the cells with formulas in them? 158005-vb-error-pic-1.png158032-vb-error-pic-2.png158033-vb-error-pic-3.png

Developer technologies | Visual Basic for Applications
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. John Korchok 224.3K Reputation points Volunteer Moderator
    2021-12-15T23:55:33.52+00:00

    Nope. Turn off protection with VBA, hide the columns, re-enable protection.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.