Skip to content

Instantly share code, notes, and snippets.

@hsinjungwu
Created August 16, 2019 02:29
Show Gist options
  • Save hsinjungwu/6e83eb7d44671e22a76ddd7f5277d1a8 to your computer and use it in GitHub Desktop.
Save hsinjungwu/6e83eb7d44671e22a76ddd7f5277d1a8 to your computer and use it in GitHub Desktop.
Unprotect Excel by VBA
Sub Unprotect()
ActiveSheet.Protect DrawingObjects:=True, CONTENTS:=True, AllowFiltering:=True
ActiveSheet.Protect DrawingObjects:=False, CONTENTS:=True, AllowFiltering:=True
ActiveSheet.Unprotect
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment