Question : How can I display the calendar pop-up in Excel 2007/

I use the attached code to pop-up the calendar when clicking in cell N1.

This works fine with Excel 2002, but I get a compile error with Excel 2007.
"Can't find project or library"

1.What code should I use with Excel 2007?
2.Is it possible to use one code for both?

Please advise
Des
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
Private Sub Calendar1_Click()
    ActiveCell.Value = CDbl(Calendar1.Value)
 
    ActiveCell.Select
End Sub
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    If Not Application.Intersect(Range("N1"), Target) Is Nothing Then
        Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
        Calendar1.Top = Target.Top + Target.Height
        Calendar1.Visible = True
        ' select Today's date in the Calendar
        Calendar1.Value = Date
    ElseIf Calendar1.Visible Then Calendar1.Visible = False
    End If
End Sub

Answer : How can I display the calendar pop-up in Excel 2007/

Well the calendar object is not listed because that is again as i told you uses access library...and here is link for calendar again..which uses mscal.ocx...it has calendar for all types..try it out...You will get 3-4 samples out of it to work with...

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_22853372.html

Saurabh...

Random Solutions  
 
programming4us programming4us