Methods and Events
These methods and events are available to the programmer:
| Method/Event | Example | Explanation |
| Click | Gives you immediate access to the properties | Use two label controls to give your user feedback on their selection. Label1.Caption is Months1.FromDateAsDate, Label2.Caption is Months1.ToDate AsDate |
| MonthBegin(array value) | 01/01/01 | The starting date of the months you have selected. Use a loop to get all dates in between |
| MonthEnd(array value) | 12/31/01 | The End date of the months you have selected and all of those in between |
| Refresh | Months1.Refresh | If you change any of the read-only properties, like AppStartDate,AppEndDate,AppNumMonths or Calendar Type, then execute this. There are no parameters, just one line in your VB load routine or elsewhere in your program |
Notes on getting all dates you've selected
MonthBegin(number) and MonthEnd(number) give you the beginning and ending values of the all the months between FromDateAsColumn and ToDateAsColumn. Use a loop to retrieve these values, as in the following example:
| For I=Months1.FromDateAsColumn to Months1.ToDateAsColumn Debug.Print Months1.MonthBegin(i),Months1.MonthEnd(i) Next I |
If your data starts on Jan1, 2001 and you select June of 2001, then Months1.FromDateAsColumn is 6. "I" starts at 6 and goes to whatever month you selected with the right mouse button (ToMonth)
If you are using Calendar types two or three, the program works exactly the same way, giving you column values and the beginning and ending dates of each month.