View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
VinceW VinceW is offline
external usenet poster
 
Posts: 17
Default Should be an easy but I can not figure it out!!

Barb.....Oh my what a simple problem this really was. The DateValue is the
correct function to use. Although the date is shown as 11/16/2009 and the
code puts that in the cell requested, I simply changed the format of the cell
to be numeric ans the serial number 40133 is there just as it should be!!!!
Sometimes it is the forest and the trees syndrome!!.... Thanks for your help
and suggestions.

"Barb Reinhardt" wrote:

My apologies. It's DateValue.
--
HTH,

Barb Reinhardt



"VinceW" wrote:

Barb,
Thanks for the quick reply, however I get the error "Sub or Function not
defined" when trying that. Any suggestions?

"Barb Reinhardt" wrote:

IIRC, you can use

DATEVAL(String) to get the serial date.
--
HTH,

Barb Reinhardt



"VinceW" wrote:

I have a text box where the user enters a date and it is assigned to variable
txtDate. How to I convert that to the serial number of the date?

Thanks for the help