Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default visual basic user form date format dd/mm/yy not mm/dd/yy

I have set up a userform and dialog in visual basic, when the user enters the
date in dd/mm/yy format on the userform the actual data is stored on the
excel sheet as mm/dd/yy format. Can anyone suggest how to stop this please

Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default visual basic user form date format dd/mm/yy not mm/dd/yy

Sub darren()
Dim d As Date
d = Now()
Range("A1").Value = d
Range("A1").NumberFormat = "dd/mm/yy"
End Sub


is an example of putting a date on the worksheet and specifying its format
at the same time.
--
Gary''s Student
gsnu200712

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
visual basic jiwolf Excel Worksheet Functions 2 October 8th 05 09:12 PM
Visual Basic and SP2 JessJ Excel Discussion (Misc queries) 2 October 6th 05 12:17 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Visual Basic Micos3 Excel Discussion (Misc queries) 9 June 28th 05 01:41 PM
Visual Basic Help Duncan Smith Excel Discussion (Misc queries) 1 December 3rd 04 09:13 AM


All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"