Using the Below CODE:
I want to add an if Statement that IF the Result of NewName = 1 than ActiveSheet.Move and Rename the New Workbook to Format(Date, "mmm") & "Schedule" Same location as the Previous
Else
move the sheet to the same workbook AUG Schedule.
Code:
Sub Copy_Unprotect_SCHEDULE()Dim NewName As String
NewName = InputBox("ENTER THE DAY OF MONTH THE NEW BID STARTS?")
MsgBox "Importing data will take a few moments we will notify you once completed", vbOKOnly
Sheets("SCHEDULE").Select
Sheets("SCHEDULE").Copy After:=Worksheets(Worksheets.Count)
Sheets("SCHEDULE (2)").Select
Sheets("SCHEDULE (2)").Unprotect "PaperPushers"
Sheets("SCHEDULE (2)").Tab.ColorIndex = 2
Sheets("SCHEDULE (2)").name = "SCH" & " " & Format(Date, "mm") & "-" & NewName
Range("K1") = " "
Range("d1") = Format(Date, "mmm")
Range("h1") = NewName
Range("J1") = Format(Date, "YYYY")
Call scheduleformulachange
[COLOR=#ff0000] ActiveSheet.Move[/COLOR]
End Sub
I want to add an if Statement that IF the Result of NewName = 1 than ActiveSheet.Move and Rename the New Workbook to Format(Date, "mmm") & "Schedule" Same location as the Previous
Else
move the sheet to the same workbook AUG Schedule.