Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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? 

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