View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
apndas[_16_] apndas[_16_] is offline
external usenet poster
 
Posts: 1
Default dd/mm converted to mm/dd


I have a just found a solution also, upon reading into it a bit mor
that mm/dd/yy is simply the default vba setting irregardless of you
computer regional settings. i have just allowed it to put the value i
the designated cell and then just reformat the cell to the date forma
you require.

.Cells(nextRow, 2).Value = txtDay.Value & "/" & txtMonth.Value & "/"
txtYear.Value
.Cells(nextRow, 2).Value = Format(.Cells(nextRow, 2), "dd/mm/yy")

it works so I'm not going to complain
an alternative solution "The best approach is to specify a date b
using VBA's DateSerial function and let Excel take care of th
formatting details (it will use the user's short date format)" - Joh
Walkenbach, Excel 2003 Power Programming with VBA

Regards
Darre

--
apnda
-----------------------------------------------------------------------
apndas's Profile: http://www.excelforum.com/member.php...fo&userid=3613
View this thread: http://www.excelforum.com/showthread.php?threadid=56654