Calendar Control - Display Issue

A

AG

[Excel2000-WIn98SE and Excel2002SP2-Win2000]

I am having a display quirk with a template using the following code
(credit to Ron De Bruin) in that the Calendar Control 8 is very slow to
hide once the cell is selected (it displays very quickly). I have tested
different video resolutions and video drivers from 5 of our ~800
computers to no avail).

If this is a Excel issue, given that I only need three cells with a
specific date format (for calculations and rate formats), one option
would be to duplicate the macro 3 times and paste each value
independently from a macro button. I would appreciate any help on the
code to paste the value in the cell as I have not been successful.

Option Explicit
Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
' ActiveCell.NumberFormat = "dd-mmmm-yyyy"
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("AN6,AT6"), 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
Else: Calendar1.Visible = False
End If
End Sub

Thanks,
KC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top