brianfosterblack
Active Member
- Joined
- Nov 1, 2011
- Messages
- 251
I have sheets for a Financial year Mar to Feb - So Jan and Feb obviously fall in the next year. The year for the start of the financial year is in cell "Master!$C$2"
I run the same macro from any of these sheets.
The macro opens up a userform in which listbox5 has the days of the month from 1 to 31 to select the day in that months under which data must be entered.
I need that if I am running this macro when in Feb month it does not allow anything above 28 to be selected and 29 in a leap year and in a month like April I cannot select 31
If these are selected it will cause an error when the macro tries to insert the data under a column which does not exist in the worksheet for that month.
I run the same macro from any of these sheets.
The macro opens up a userform in which listbox5 has the days of the month from 1 to 31 to select the day in that months under which data must be entered.
I need that if I am running this macro when in Feb month it does not allow anything above 28 to be selected and 29 in a leap year and in a month like April I cannot select 31
If these are selected it will cause an error when the macro tries to insert the data under a column which does not exist in the worksheet for that month.