LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional format with error & date check RobofMN Excel Worksheet Functions 3 January 22nd 09 01:57 AM
How to check date format in display cell value moonhk Excel Programming 1 November 7th 07 02:07 AM
Check data item is date not text format Jimbob Excel Programming 3 August 4th 07 09:36 AM
Check if Conditional Format is True or False / Check cell Color Kevin McCartney Excel Worksheet Functions 5 June 29th 07 11:12 AM
Change text to date and check against date in cell RW Excel Programming 3 February 2nd 06 03:29 PM


All times are GMT +1. The time now is 09:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"