I am having a problem using a Calendar Control 9.0 in Excel 2000.
During 2004, I could use the following code to select a date (a Monday)
and the program would find the data for that week on the "Records"
sheet and copy it to the the "Full Day" sheet. Since 2005 started,
whenever I try to select a date from last year, the calendar displays
correctly while it is open and the data for the selected week even
displays while the date is being mouse-clicked and held, but as soon as
the mouse is released, the data disappears. When I reopen the calendar
the year has changed back to 2005. I was also wondering what the $ in
Format$ means. Thanks in advance for any help.
Private Sub Calendar1_Click()
ActiveSheet.Range("D5") = Format$(Calendar1.Value, "m/d")
Me.Calendar1.LinkedCell = ActiveSheet.Range("D5").Address
Calendar1.Visible = False
ToggleButton1.Value = True
Dim CurrentMonday As Range
Dim R As Integer
Sheets("Records").Activate
Set CurrentMonday =
Sheets("Records").Range("Records").Find(what:=Sheets("Full
Day").Range("D5").Value)
CurrentMonday.Select
For R = 5 To 11
ActiveCell.Offset(0, 1).Copy Destination:=Sheets("Full
Day").Range("C" & R)
ActiveCell.Offset(0, 3).Copy Destination:=Sheets("Full
Day").Range("F" & R)
[8 more lines just like those above]
ActiveCell.Offset(1, 0).Select
Next
Sheets("Full Day").Activate
End Sub
Bookmarks