No idea what the problem is - I've created a workbook with the exact code I posted in and it runs fine, even when I put a formula in the EndingMonth cell.

Try this, if your FirstMonthHeading cell is A1 and, say, your EndingMonth is in B2 use the code...

Sub Populate()
    Dim Counter As Integer
    Dim Ending As Integer
    Counter = 1
    Ending = Sheets(1).Range("B1").Value
    While Counter < Ending
        Sheets(1).Range("A1").Offset(Counter-1,0).Value=Counter
        Counter = Counter + 1
    Wend
    
    
End Sub
Change the ranges and the sheet numbers to match the format of your workbook and see if that works. If it does then there's something up with the way you've named the ranges.