I'm trying to run a macro that will copy and save the sheet with today's date in its worksheet name. It will work perfectly fine when I run this macro once a day, but it will give back an error when I run it a second time during the same day because I don't have any error handling in it. Ideally, if the macro is ran the 2nd time during the same day, I would like to add "(1)" at the end of the name, or "(2)" if it is the third time and so on. Can someone help me on how to do this? Below is the current macro code which is very simple...
VBA Code:
Sub Create_Draft()
' Create copy to new tab
ActiveSheet.Range("5:150").Copy
todayDate = Format(Date, "yy-mm")
Sheets.Add After:=Worksheets("Order")
ActiveSheet.Name = ("Draft_" & todayDate)
ActiveSheet.Paste
' Set Password to New Sheet
ActiveSheet.Protect password:="aaaa"
End Sub