SteveOranjin
Board Regular
- Joined
- Dec 18, 2017
- Messages
- 170
Code:
Sub Clear_Sheet() Application.ScreenUpdating = False
Dim Msg As String, Ans As Variant
Msg = "Are you sure you want to clear all data in 'Data Sheet'"
Ans = MsgBox(Msg, vbYesNo)
Select Case Ans
Case vbYes
Sheets("Data Sheet").Cells.ClearContents
Sheets("Data Sheet").Select
Cells.Select
Selection.Style = "Normal 2"
Selection.NumberFormat = "General"
Range("A1").Select
On Error Resume Next
Application.CutCupMode = False
On Error GoTo 0
Case vbNo
End Select
Quit:
Application.ScreenUpdating = True
End Sub