View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Amanda Amanda is offline
external usenet poster
 
Posts: 151
Default Enter date via pop-up calendar

I have followed Ron's directions, but I can't get a date other than today's
date to appear. I am not able to select any other date using the calendar.
This is the code I am using:

Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.Offset(0, 1).Select
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("J3"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub


Can someone tell me what I am missing?
Thanks!
Amanda


"Ron de Bruin" wrote:

Try this Olivier
http://www.rondebruin.nl/calendar.htm

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


"Olivier" wrote in message ...
How can I provide the user with a 'calender pop-up' as in Outlook, where
(s)he can easily select and enter a valid date in a worksheet cell ?

I assume I don't have to create this pop-up from scratch in Excel, as it is
available in Outlook.
Once defined, I would add this function/routine on right_click_mouse event