How do i know the current format of cell in excel? - TechRepublic
Question
September 25, 2009 at 12:10 AM
sprema

How do i know the current format of cell in excel?

by sprema . Updated 16 years, 9 months ago

Actually i need to display a calendar in which cell has the format as date. I got a code to display the calendar,
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If IsDate(ActiveCell.Value) Then

With Calendar1
.Visible = True
.Left = ActiveCell.Left + ActiveCell.Width
.Top = ActiveCell.Top
.Value = ActiveCell.Value
End With
Else
Calendar1.Visible = False
End If
End Sub

in this its responding when it has the date value but i need the cells in which cell has the date format..

This discussion is locked

All Comments