I have a macro that clears a database for the quarter, to start fresh with the next quarter. Each quarter adds a few things, so it's not feasible to just start with a blank from the original file. I'm trying to add something to the macro that will save the current file (the outgoing quarter), and then prompt for a Save As file name and save the active workbook to the new filename, and allow the user to continue working on the new quarter's file without having to close/reopen anything. Right after the Save As is complete, the macro would continue to reset the values that need to be reset for the new quarter. This way the previous quarter's data is maintained.
I've tried copying a few different codes in here to achieve this, and haven't had much luck. I've cleared my attempts out, and here's the code I'm working with... Thanks for the help!
I've tried copying a few different codes in here to achieve this, and haven't had much luck. I've cleared my attempts out, and here's the code I'm working with... Thanks for the help!
Code:
Sub TLDChangeOut()
Dim ActiveWorkbook As Workbook
msgValue = MsgBox("Are you sure? All TLD numbers and issue/collection dates will be permanently deleted!", vbYesNo + vbCritical, "TLD Changout?")[INDENT]
If msgValue = vbYes Then
[/INDENT]
[INDENT=3]'Insert "Save" and "Save As" here[/INDENT]
[INDENT=2]Sheets("Main Data").Range("C7:D250").Value = "" ' clears the data for new quarter
Sheets("Main Data").Range("G7:G250").Value = "" ' clears the data for new quarter[/INDENT]
[INDENT]ElseIf msgValue = vbNo Then
End If[/INDENT]
End Sub