pop up calendar - PLEASE HELP
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 |
All times are GMT +1. The time now is 01:05 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com