Hi, I decided to change the code to reference named ranges instead of "UsedRange". However I am getting error 1004, Application or Object Defined Error on the line which is in
red. I can't figure this out... Modified code:
Code:
Sub ClearUnlockedCells()
Dim msg As String, ans As Variant
msg = "Completing this action will delete all form data! Continue?"
ans = msgbox(msg, vbOKCancel, "Z-Models SCP Info")
Select Case ans
Case vbOK
Application.ScreenUpdating = False
'On Error Resume Next
Application.DisplayAlerts = False
Range("Z_GD") = ""
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Case vbCancel
End Select
Sheets("General Data").Range("B4").Select
End Sub