View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Neutral date format in VBA

if cdate(stringvariable) = DateValue("August 15, 2005") then

--
Regards,
Tom Ogilvy

"Balex" wrote in message
...
Hi,

I have an Excel macro that checks a document property which is a date. I

am
checking a given date, which, if set, triggers a given processing. How can

I
design my if statement so that the check is always working regardless of

the
locale of the user running Excel, i.e. if I want to check if the date is
equal to the 15th of August 2005, how should my if statement look like ?

Thanks for help
Balex