View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2393_] Rick Rothstein \(MVP - VB\)[_2393_] is offline
external usenet poster
 
Posts: 1
Default Check for NumberFormat = DateFormat

You will need to clarify what you consider a date. Your use of "sth"
(although I'm not sure what the "t" stands for) seems to suggest you will
accept date parts as being date formatted, is that correct? For example,
would a format of mmmm be considered a date format? I ask because the VB
IsDate function would return False for it. So, I am looking for your
complete definition of what would constitute a "date format".

Rick


"J. Blauth" wrote in message
...
Hi all,
is there a simple way to check if a Range.NumberFormat returns a Date
format ? To be sure I am not misunderstood: the Cell-Values might be empty
but the cells are formatted to a date format. by default it might be
dd/mm/yy or similar but could also return "[$-409]d/m/yy h:mm AM/PM;@" or
sth.
what I am searching for is a simple way to check if the range.numberformat
fits to any possible dateformat. best case would be "If Range.NumberFormat
= IsDateFormat then..." but I cannot seem to find something like that. Is
there an easy solution for that ?
thanks for any kind of hints.

Joe.