Hi,
I'm a bit of a novice when VBA and have tried a macro that removes a password from a locked excel sheet, does an action and locks the sheet again with the password.
I seem to be unable to enable filtering and sorting, getting the error message "expected named parameter". Is anyone able to help? My code is below:
' DeleteRows Macro
'
'Sub ModifyProtectedSheet()
ActiveSheet.Unprotect Password:="****"
response = MsgBox("Are You Sure You Wish To Delete? Deleted Rows Cannot Be Recovered", vbYesNo)
If response = vbNo Then
MsgBox ("No Entries Deleted")
Exit Sub
End If
-> recorded process here
ActiveSheet.Protect Password:="****", AllowFiltering:=True<strike></strike>, AllowSorting:=True<strike></strike>,<strike></strike>
End Sub
Thanks for your help in advance!
I'm a bit of a novice when VBA and have tried a macro that removes a password from a locked excel sheet, does an action and locks the sheet again with the password.
I seem to be unable to enable filtering and sorting, getting the error message "expected named parameter". Is anyone able to help? My code is below:
' DeleteRows Macro
'
'Sub ModifyProtectedSheet()
ActiveSheet.Unprotect Password:="****"
response = MsgBox("Are You Sure You Wish To Delete? Deleted Rows Cannot Be Recovered", vbYesNo)
If response = vbNo Then
MsgBox ("No Entries Deleted")
Exit Sub
End If
-> recorded process here
ActiveSheet.Protect Password:="****", AllowFiltering:=True<strike></strike>, AllowSorting:=True<strike></strike>,<strike></strike>
End Sub
Thanks for your help in advance!