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: 6
Default NumberFormat not taking

Hi

I'm loading data into a sheet. I'm setting the NumberFormat of the column

' ---- set default date format i.e. "dd-mm-yyyy"
l_oSheet.Columns(l_nCol).NumberFormat = C_DEFAULT_DATEFORMAT

' ---- if a custom format for the data is set, use that i.e. "mm/yy"
If LenB(.Format(l_nCol)) < 0 Then
l_oSheet.Columns(l_nCol).NumberFormat = .Format(l_nCol)
End If

When I load the data, the data is being displayed in "dd/mm/yyyy" format
irrespective of the format I'm setting the column to. I've also tried
setting the NumberFormat of each cell and this makes no difference

What more do I need to do to get Excel to recognise my custom format. Or do
I need to use a completely different mechanism?

Thanks

Simon


 
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
.numberformat Q Aaron Excel Worksheet Functions 4 December 18th 09 02:15 AM
NumberFormat danpt Excel Discussion (Misc queries) 3 May 20th 09 10:55 PM
numberformat? Jack Sons Excel Discussion (Misc queries) 3 September 4th 07 03:44 PM
NumberFormat? alex Excel Worksheet Functions 3 March 1st 07 09:12 PM
Numberformat Syrus the Virus[_13_] Excel Programming 6 February 12th 04 02:12 PM


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