View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 238
Default Date format issue

Perfect!

I can leave TextBox1.Value = Format (Date, "dd/mm/yyyy") assigned to the
command button, then Range("E2") = Cdate(TextBox1.Value) is exactly what I
needed to convert the transferred data to date format.

Thank you very much.
--
Ian
--
"ramesh_rajamoni"
<ramesh_rajamoni.1z70un_1133158208.3118@excelfor um-nospam.com wrote in
message news:ramesh_rajamoni.1z70un_1133158208.3118@excelf orum-nospam.com...

whenever u use format function of vb it returns a string , in this case
u need to set the format of the excel cell to which u r exporting the
date value.
if u have in a textbox some date value convert it (if necessary) to
date datatype using cdate() in vb and export to a excel cell which is
formatted as date type - use format cells option.

-RR


--
ramesh_rajamoni
------------------------------------------------------------------------
ramesh_rajamoni's Profile:
http://www.excelforum.com/member.php...o&userid=29139
View this thread: http://www.excelforum.com/showthread...hreadid=488492