>Hilmar,
>
>I did a search and did not find the particular issue addressed.
>
>I'm working on command button class to popup a form with an oleCalendar on it, grab the selected value, and apply it to a field, textbox value, or form property. I would like the form and oleCalendar to be a single class, and the cmdButton.click() to be able instantiate it, run it, and do something with the date selected.
OK; I'm not sure this is the easiest way, but I believe you can achieve your purpose as follows:
Let's first suppose you call your custom object from another form. Call it with ThisForm as parameter.
In the calendar form, fetch the calling form in Form.Init(), and save it into a form property. Let's say this property is ThisForm.oCallingObject.
When closing your calendar form, save a value to ThisForm.oCallingObject.dSelectedDate.
Of course, the calling form must have this property.
You can also pass any other object as a parameter. Just make sure it has the required property.
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)