I run code to protect cells, whilst allowing users to access certain features of Excel to view/sort data. I want to run two macros when the workbook is opened, to make sure any selections made in dropdown boxes are cleared.
I thought this would work, but it doesn't like the calls for macros.
First module/macro:
Second module/macro:
Can someone please tell me how I get this working?
I thought this would work, but it doesn't like the calls for macros.
VBA Code:
Private Sub Workbook_Open()
Dim sh As Worksheet
For Each sh In Worksheets
If sh.Name = "Property Numbering" Then
sh.Protect UserInterFaceOnly:=True, AllowSorting:=True, AllowFiltering:=True
Call PRGEReset
Call PRGFReset
Else
sh.Protect UserInterFaceOnly:=True
End If
Next
End Sub
First module/macro:
VBA Code:
Sub PRGEReset()
Range("C13").Select
Selection.ClearContents
Range("C13").Select
End Sub
Second module/macro:
VBA Code:
Sub PRGFReset()
Range("C8").Select
Selection.ClearContents
Range("C8").Select
End Sub
Can someone please tell me how I get this working?