LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default displaying yy instead of yyyy

Hi Norman,
Thanks for saving my day.
Joshua


"Norman Jones" wrote:

Hi Joshua,

The following worked for me for a specified range.

Sub XYZ()
Dim rng As Range

Set rng = Range("A1:A10")
With rng
.NumberFormat = "dd-mm-yyyy"
.Cells(1).Value = "01-Jun-2005."
End With

End Sub

I am not aware of a way to change the default behavior.


---
Regards,
Norman



"josh7" wrote in message
...
I have used the statement Format(sysdate,"dd-mm-yyyy) in Visual basic 6.But
as soon as it gets entered in Excel its truncates the date to dd-mm-yy. Is
there a way to automate this process using Visual Basic 6 to dd-mm-yyyy
Thanks,
Joshua



"Norman Jones" wrote:

Hi Josh7,

Format the date entry cells with a custom format:

dd-mmm-yyyy

---
Regards,
Norman



"josh7" wrote in message
...
When I enter a date value in excel spreadsheet like 01-Jun-2005 ,its
saving
the value as 01-Jun-05 instead of 01-Jun-2005.What should I do to save
it
as
01-Jun-2005.
Thanks,
Joshua









 
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
How do I convert a birthdate format from yyyy/mm/dd to mm/dd/yyyy Amy Ann Excel Worksheet Functions 3 December 13th 07 08:07 PM
how do I change date from mm/dd/yyyy to dd:mm:yyyy format in Excel Jack Wilson New Users to Excel 4 July 18th 06 01:57 PM
change birthday display from mm/dd/yyyy to HIDE the yyyy? johnp Excel Worksheet Functions 1 May 9th 06 09:56 PM
YYYY format displaying wrong date Blaise Excel Discussion (Misc queries) 3 October 12th 05 02:28 AM
opening excel file - date format problem: DD/MM/YYYY vs MM/DD/YYYY yung Excel Programming 2 March 18th 05 12:50 PM


All times are GMT +1. The time now is 03:18 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"