Code:
Sub Create()
Dim i As Long
Dim xNumber As Integer
Dim xName As String
Dim xActiveSheet As Worksheet
On Error Resume Next
Application.ScreenUpdating = False
Set xActiveSheet = ActiveSheet
xNumber = InputBox("ENTER NUMBER OF TIMES TO COPY THE CURRENT SHEET")
For i = 1 To xNumber
xName = ActiveSheet.Name
xActiveSheet.Copy After:=ActiveWorkbook.Sheets(xName)
With ActiveSheet
.Name = i
.Range("K1") = " "
.Range("H1") = i
.Range("J1") = Format(Date, "yyyy")
.Range("d1") = "SEPT"
Call scheduleformulachange
End With
Next
xActiveSheet.Activate
Application.ScreenUpdating = True
End Sub
Code:
Sub Copy_Unprotect_SCHEDULE()
Call Create
Sheets("SCHEDULE").Select
ActiveWindow.SelectedSheets.Visible = False
MsgBox "IMPORT IS COMPLETED", vbOKOnly
End Sub
I Recently got an issue with these codes only working when I run them in Debug mode put not in regular mode cannot figure out what's going on. When I run it in Runtime it seems as its never ending and freezing up excel. Help Please