Ive used the following sub procedure to clear an input once a reset button is pressed however it is clearing all of the text on my worksheet. I have done this with multiple other inputs and not had this problem so I am unsure why this is happening.
Sub ClearPremisesDataEntry()
Dim InputSheet As Worksheet
Dim InputRange As Range
Set InputSheet = Worksheets("Input")
Application.ScreenUpdating = False
Application.EnableEvents = False
'The range of cells that will be copied from the input sheet are set to InputRange
Set InputRange = InputSheet.Range("PremisesDataEntryClear")
'Clears the input cells ready for new a new input
With InputSheet
On Error Resume Next
With InputRange.Cells.SpecialCells(xlCellTypeConstants)
.ClearContents
Application.GoTo .Cells(1) ', Scroll:=True
End With
On Error GoTo 0
End With
Application.EnableEvents = True
End Sub
Sub ClearCommunicationDataEntry()
Dim InputSheet As Worksheet
Dim InputRange As Range
Set InputSheet = Worksheets("Input")
Application.ScreenUpdating = False
Application.EnableEvents = False
'The range of cells that will be copied from the input sheet are set to InputRange
Set InputRange = InputSheet.Range("CommunicationDataEntryClear")
'Clears the input cells ready for new a new input
With InputSheet
On Error Resume Next
With InputRange
.ClearContents
Application.GoTo .Cells(1) ', Scroll:=True
End With
On Error GoTo 0
End With
Application.EnableEvents = True
End Sub