mitzen
Structural
- Jul 13, 2016
- 5
Hi i'm new on vba and want to clear my inputs and autosave on one click.
i have tried this but have an inconsistent results (will clear on exit and sometimes retain its info.)
does anyone who's a vba expert that is willing to help
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub Button1_Click()
Range("C18").ClearContents
Range("C21").ClearContents
Range("G6").ClearContents
Range("G7").ClearContents
Range("G8").ClearContents
Range("G22").ClearContents
MsgBox "Thank You"
Application.Quit
Application.DisplayAlerts = False
ActiveWorkbook.Close
If ThisWorkbook = False Then
ThisWorkbook = Save
End If
End Sub
i have tried this but have an inconsistent results (will clear on exit and sometimes retain its info.)
does anyone who's a vba expert that is willing to help
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub Button1_Click()
Range("C18").ClearContents
Range("C21").ClearContents
Range("G6").ClearContents
Range("G7").ClearContents
Range("G8").ClearContents
Range("G22").ClearContents
MsgBox "Thank You"
Application.Quit
Application.DisplayAlerts = False
ActiveWorkbook.Close
If ThisWorkbook = False Then
ThisWorkbook = Save
End If
End Sub