Is there a way to auto hide ]Date and time picker control 6.0, so that the calender only appears when a cell is selected.
I would like to have the option to click on a cell say A1 and many other selected cells and a calender then open up (with todays date) and allow me to select another date.
I can get the calender to link to a cell but the calender is always stays visible in full month view, would like it to auto hide when moving away from cell A1 etc.
Many thanks for any help.
Hello ,
To make this work, requires code be placed in each DTPicker_CloseUp() event and each worksheet's Worksheet_SelectionChange event that has one or more DTPickers. Here is the code.
DTPicker CloseUp Event Code
This code must be added to each DTPicker. Be sure to change the DTPicker name to match the new control when adding the code.
Worksheet Selection Change Event CodePrivate Sub DTPicker1_CloseUp() DTPicker1.Visible = False End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim OLEobj As Object For Each OLEobj In ActiveSheet.OLEObjects If TypeName(OLEobj.Object) = "DTPicker" Then If Not Intersect(Target, OLEobj.TopLeftCell) Is Nothing Then OLEobj.Visible = True End If Next OLEobj End Sub
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Hello,
Thanks for your reply, but on reflection and having had problems with date & time picker on other pc's with excel 2007, I believe that the Calender control 11.0 / 12.0 may be a better option.
Could you offer any help on this function, where again i would like the calendar to appear when a cell is selected and disappear when a date is entered.
Many Thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks