View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kim Kim is offline
external usenet poster
 
Posts: 284
Default VBA Date Format Cell Check

Hi,

I'm trying to check cells for Date format or not, but the code below isn't
working properly. Despite confirming the Date format in the cells being
checked, my code isn't running the command (ActiveCell.Offset(1, 0).Activate
Instead, it's branching to the Else command, which I do not want. This seems
simple, can someone help?

If ActiveCell.NumberFormat = "Date" Then
ActiveCell.Offset(1, 0).Activate
Else
ActiveCell.Select
Selection.Cut
ActiveCell.Offset(-1, 1).Activate
ActiveSheet.Paste
ActiveCell.Offset(1, -1).Activate
End If



Thanks!
Kim