VinceF
Board Regular
- Joined
- Sep 22, 2007
- Messages
- 172
- Office Version
- 2016
- Platform
- Windows
Thank you in advance for any assistance.
Novice user, Office 2016, Win 10
With using a command button, I'm looking for a VBA code that would clear only the values in particular cells and ranges without deleting the formulas. I have managed to learn how to replace text in a cell but I am unable to figure out how to clear values while maintaining formulas where needed. If you could post a string that would do this and where I would add it into the existing code that would be very helpful.
Thank You,
VinceF
Private Sub CommandButton1_Click()
Dim warning
warning = MsgBox(Range("A1").Value & " WARNING...!!!! This will reset the entire sheet. Select OK to continue or select CANCEL to continue without resetting", vbOKCancel, "Warning")
If warning = vbCancel Then Exit Sub
Sheets("main").Range("E4").Value = "SKINS ENTRY FEE"
MsgBox "THE FORM HAS BEEN RESET."
End Sub
Novice user, Office 2016, Win 10
With using a command button, I'm looking for a VBA code that would clear only the values in particular cells and ranges without deleting the formulas. I have managed to learn how to replace text in a cell but I am unable to figure out how to clear values while maintaining formulas where needed. If you could post a string that would do this and where I would add it into the existing code that would be very helpful.
Thank You,
VinceF
Private Sub CommandButton1_Click()
Dim warning
warning = MsgBox(Range("A1").Value & " WARNING...!!!! This will reset the entire sheet. Select OK to continue or select CANCEL to continue without resetting", vbOKCancel, "Warning")
If warning = vbCancel Then Exit Sub
Sheets("main").Range("E4").Value = "SKINS ENTRY FEE"
MsgBox "THE FORM HAS BEEN RESET."
End Sub