Thanks for the help! The first line above I changed. I didn't change the second line, but instead changed
to
StartD = Worksheets("Sheet1").Cells(lr, "H")
.
Now it works and the code looks like this
Private Sub CommandButton1_Click()
Dim Row As Long
Dim lr As Variant
lr = Worksheets("Sheet1").Cells(Worksheets("Sheet1").Rows.Count, "H").End(xlUp).Row
Dim StartD As Date, EndD As Date
StartD = Worksheets("Sheet1").Cells(lr, "H")
EndD = Date
For Row = 1 To (EndD - StartD)
Application.ScreenUpdating = False
Worksheets("Sheet1").Cells(lr + Row, "H") = StartD + Row
Next Row
Application.ScreenUpdating = True
End Sub
Bookmarks