Are you creating a calendar? Your explanation is vague.
"Get all the dates of the month" means how many days there are? If so
Code:
Dim FirstDay As Date
FirstDay = DateSerial(Year(YourDate),Month(YourDate),1)
Dim LastDay As Date
'The 0 as day returns the last day of the previous month
LastDay = DateSerial(Year(YourDate),Month(YourDate)+1,0)
Dim DaysOfMonth as long
DaysOfMonth = LastDay - FirstDay + 1
This approach only needs a date. It does the rest of the math for you. You need to provide the year, because there are leap years, so February has a different amount of days in different years.
You could also do something like this to get the amount of days in current month Day(DateSerial(Year(Now), Month(Now) + 1, 1) - 1) - Day(DateSerial(Year(Now), Month(Now), 1)) + 1
None of these is tested.
If you want to get the weekday, use the built in WeekDay function with a dateserial to get whatever day of the month you need.
Oh, that is more interesting. You have to account for the way your data is input. There are many things you should take into account here, such as:
How are the week days considered data wise? numbers or strings?
How about months?
Are you going to always type month-year? like this? FEB-2023, or can it be february-2023? or something else?