ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calendar Control in UserForm (https://www.excelbanter.com/excel-programming/406448-calendar-control-userform.html)

D

Calendar Control in UserForm
 
I have a User Form with a command button that is set to open another form
with a Calendar Control.

I would like to have the the date choosen in my frmCalendar to then be
entered into my main form (frmLoaner) in a field named txtOrderDate. Also,
can I use this same frmCalendar to enter dates into other fields or do I need
to have seperate calendars?

Matthew Pfluger

Calendar Control in UserForm
 
It is very possible to send a value between userforms. Consider defining
Userform Properties. Make sure that you copy the property from the
frmCalendar to the frmLoaner before Unloading it.

Also, using properties, you can build the frmCalendar in a way that it
return dates however often it is needed per form. That's a very good idea.
Perhaps you could call it as a function:

frmLoaner.txtAnyTextbox.Value = frmCalendar.Date

I know this is just conceptual at this point, but you should be able to set
this up.

HTH,
Matthew Pfluger

"D" wrote:

I have a User Form with a command button that is set to open another form
with a Calendar Control.

I would like to have the the date choosen in my frmCalendar to then be
entered into my main form (frmLoaner) in a field named txtOrderDate. Also,
can I use this same frmCalendar to enter dates into other fields or do I need
to have seperate calendars?



All times are GMT +1. The time now is 09:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com