ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date ?? (https://www.excelbanter.com/excel-programming/294959-date.html)

greg

Date ??
 
I am using the "calendar control" to select a date that is used further down in my script. What I want to do is make sure the when the form is diplayed and the calander comes up it is set to today dates. This not happening. What is the trick to control the date value in the calendar control? TI

Sub cPickDate_Click() <----this is the calendar contro
theDate = cPickDat
theDate = Format(theDate, "mm/dd/yyyy"
End Su


Ron de Bruin

Date ??
 
Hi Greg

Calendar1.Value = Date

For more info see
http://www.rondebruin.nl/calendar.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Greg" wrote in message ...
I am using the "calendar control" to select a date that is used further down in my script. What I want to do is make sure the when

the form is diplayed and the calander comes up it is set to today dates. This not happening. What is the trick to control the date
value in the calendar control? TIA

Sub cPickDate_Click() <----this is the calendar control
theDate = cPickDate
theDate = Format(theDate, "mm/dd/yyyy")
End Sub




kkknie[_36_]

Date ??
 
In the UserForm_Activate event, put

cPickDate.Value = Now()



--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 05:31 AM.

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