Hello, everybody!
I'm trying to catch the number of the days in a given month with a variable. To do that, I'm using the follow line:
But I'm getting the follow message:
Do somebody know how to solve it?
Thanks in advance!
I'm trying to catch the number of the days in a given month with a variable. To do that, I'm using the follow line:
VBA Code:
dias_do_mes = Day(Application.WorksheetFunction.EoMonth(Application.WorksheetFunction.Date(Range("K3").Value, Range("J3").Value, 1), 0))
Month.xlsm | ||||
---|---|---|---|---|
J | K | |||
2 | Month | Year | ||
3 | 1 | 2021 | ||
Planilha1 |
But I'm getting the follow message:
Do somebody know how to solve it?
Thanks in advance!