I have a macro that I have been using for a few years. The code takes the current years data for each future months only one at a time and moves it to the bottom of the page in a section to capture the prior months data. Then the code is supposed to clear each month one at a time in the above section as well. Now it appears to only be working for the first sheet in the array. Is anyone able to help with what might be causing this new issue all of a sudden?
Sub RollMonths()
CurrDate = Sheets("2024 UNCONS").Cells(2, "R")
MonthNum = Month(CurrDate)
CurrYear = MonthNum
CurrYearQR = MonthNum
CurrYearCON = MonthNum
NextYear = 0
NextYearQR = 0
NextYearCON = 0
”CURRENT YEAR SHEETS”
Sheets(Array(“2024 UNCONS”, “2024 SUPPLY”, “2024 ADJ”)).Select
Sheets(“2024 UNCONS”).Activate
Do
Range("B10:B32").Offset(0, CurrYear).Select
Selection.Copy
Range("B49").Offset(0, CurrYear).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B10:B32").Offset(0, CurrYear).Select
Application.CutCopyMode = False
Selection.ClearContents
CurrYear = CurrYear + 1
Loop Until CurrYear = 12
ActiveWindow.ScrollRow = 3
Range("R1").Select
I’m not sure if this is actually the first month this happened or not but I don’t recall it happening last month. No changes have been made to the code, file, etc. All of a sudden it’s only clearing the columns for the first tab in the array and not clearing any other data from any other tabs.