Group:  Microsoft Excel ยป microsoft.public.excel.links
Thread: pop up calendar - PLEASE HELP

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

pop up calendar - PLEASE HELP
"Al" <Mushtaq.Q.Ali[ at ]gmail.com> 31.08.2006 21:17:48
Hello everyone...

I have the following code on my worksheet to popup the calendar. The
calendar worked fine when I was initially putting the code on the
worksheet, BUT when I saved and closed my worksheet and re-opened it...
the Calendar popped up right on top on the worksheet and I can't change
any dates by clicking on it.... (It just stays there - frozen). I only
want the Calendar to pop up when someone clicks on the cell C17.... NOT
EVERYTIME I OPEN THE WORKSHEET. Can someone please HELP ME fix this
problem. I will really appreciate it.

Private Sub Calendar1_Click()
ActiveCell.NumberFormat = "m/d/yyyy"
Calendar1.Visible = False
ActiveCell = Calendar1.Value
Calendar1.Visible = False
End Sub


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("c17:c17"), Target) Is Nothing Then
'(adjust for your range)
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Value = Now()
Calendar1.Visible = True
Else: Calendar1.Visible = False
End If
End Sub

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net