LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Date not converting to regional format

I have a colleague in Switzerland who has a macro which creates a spreadsheet
that needs to be sent to me here in the U.S. and to others in various parts
of the world. He is working with his regional formats (date, etc.).

He is trying to place a date value in a cell. When he does, he says it
looks OK when he views the cell, but when he sends the spreadsheet to me,
even though the cell is formatted as Date, it looks like text to me. A value
which he enters as "31.03.2006" should look like "3/31/2006" on my machine,
but instead looks like the original "31.03.2006" and is left justified, as
text would be.

Below is the code he is using. How should it be changed to accomplish this?

Dim vStartDate As Variant
vStartDate = Range("A3").Value
sValue(i) = DateValue(vStartDate)

Cell A3 has a valid, regionally formatted date in it ("31.03.2006").
The destination end up with a text value ("31.03.2006") instead of a date
value.

 
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
Format date with specific regional format Fjord Excel Worksheet Functions 1 December 2nd 09 07:12 PM
Need help with converting CUSTOM format/TEXT format to DATE format Deo Cleto Excel Worksheet Functions 6 June 2nd 09 08:14 PM
Converting to date format ahaigh Excel Discussion (Misc queries) 1 March 13th 06 06:54 PM
date format in excel not in line with control panel regional setti GrahamR Excel Discussion (Misc queries) 3 August 2nd 05 06:48 PM
converting date from a textbox to a date format neowok[_17_] Excel Programming 5 February 23rd 04 01:40 PM


All times are GMT +1. The time now is 11:48 AM.

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"