View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
deko[_3_] deko[_3_] is offline
external usenet poster
 
Posts: 62
Default Formatting chart TickLabels fails to include time with date

The data I'm trying to chart has date values in Column A that look like
this:

01/29/2005 13:23
01/29/2005 14:30
01/29/2005 15:37
01/30/2005 05:11
01/30/2005 06:17
01/30/2005 07:24
etc., etc.

After inserting this data from Access (and all the corresponding values in
Column B through whatever), I use automation to format Column A like this:

xlapp.Workbooks(strXlsFile).Worksheets(sn(i)).Rang e _
("A2:A" & lr).NumberFormat = "mm/dd/yyyy hh:mm;@"

I try to format the TickLabels like this:

objChart.Axes(xlCategory).TickLabels.NumberFormat = _
"mm/dd/yyyy hh:mm;@"

but the TickLabels appear like this:

01/29/2005 00:00
01/29/2005 00:00
01/29/2005 00:00
01/30/2005 00:00
01/30/2005 00:00
01/30/2005 00:00

which screws up the chart since the intra-day values are all stacked on top
of each other.

Is there any way to get the TickLabels to display the time as well as the
date? Am I applying the TickLabel formatting correctly?

Thanks in advance.