Hi,
I am facing an issue where calendar is not working at all in Ms excel 2010 which is working fine in 2007. I have used Calendar control 12.0 logic in 2007. I understand that 2010 doesn't have this ocx compatible which is causing this issue.
Problem is I don't have Microsoft date picker as well in 2010. Please can anyone suggest an easy way to make it working in 2010 excel without much changes in code? If that's not possible at all, please suggest some easy way to do it.
Code used in 2007:
------------------------------------------
Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "dd/mm/yyyy"
ActiveCell.Select
If Calendar1.Value Then
Calendar1.Visible = False
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("D4:D11, B4:B11, F4:F11"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub
----------------------------------------------------
Regards,
Anu Arora
Bookmarks