Home Excel Powerpoint Word Outlook Error Codes

VBA Useful Codes

Welcome to the World of VBA
Home > VBAUsefulCodes

Protect Sheet VBA


Protect the sheet with some passwords, so that we can restrict the content of the sheet for others modification. Ex: we can make the sheet readonly, so that others cant edit the sheet without password

Sub sbProtectSheet()
pswd = "VBA$123"
ActiveSheet.Protect pswd, True, True
End Sub

Subscribe

Enter your e-mail below and get notified on the latest blog posts.




Tags

VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts


Follow Us