Re: use VBA Calendar Control without Control in existing form
Quote from TJEI have been trying to modify a form I inherited and replace the VBCalendar control with Phyl's calendar10.zip. Can anyone help me with the code I need to use the date from the calendar add in to my form. My form has a command button named cmdDate to open the calendar and I need to return the date to a Text box named TextDate2 I appreciate any help you can give, I have done a lot of VB and Excel but am new to the calendar concept. :?
Here's what I did with mine, after much perusing of this board and others (I am not familiar with VB or VBS - so it took a lot of guess and testing). I needed to ensure that the result of my popup calendar was sent only to one particular cell - and not the many various other date formatted cells generated by other formulas. That was a nightmare to fix.
My popup calendar is called by a button.
The quick and disgustingly simple trick to cure that problem child was this...
Quote
Private Sub CommandButton1_Click()
'Edit to your required cell, mine is "A1"
Range("A1").Select
CalendarFrm.Show
End Sub
Not sure how to specifically modify this to your textfield name... but I'm guessing you know more about VB than I do. Hope this helps : D