Hello
I'm making monthly reports and want a function that gives me the current month and year. I did this:
Sub date()
With Range ("A1")
.Value = Date
.NumberFormat = "Mmmm yyyy"
End with
End Sub
However, I have to two issues. The month doesn't start with a capital letter (so it says "march" instead of March"). I have tried to incorporate the "Upper" command into my code but haven't succeed.
Also I would like only to have the cell updated when I press a button. Otherwise I have the problem that if I look into the previous months report, it will automatically update to the currents month and this ruins the whole idea.
I'm making monthly reports and want a function that gives me the current month and year. I did this:
Sub date()
With Range ("A1")
.Value = Date
.NumberFormat = "Mmmm yyyy"
End with
End Sub
However, I have to two issues. The month doesn't start with a capital letter (so it says "march" instead of March"). I have tried to incorporate the "Upper" command into my code but haven't succeed.
Also I would like only to have the cell updated when I press a button. Otherwise I have the problem that if I look into the previous months report, it will automatically update to the currents month and this ruins the whole idea.