Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Formatting chart TickLabels fails to include time with date

With ActiveSheet.ChartObjects("Chart 2").Chart
.Axes(xlCategory, xlPrimary).CategoryType = xlCategoryScale
End With


That helped! Thanks!


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
Excel VBA Chart TickLabels djdwwoug Excel Discussion (Misc queries) 6 August 31st 07 09:02 PM
TickLabels djdwwoug Charts and Charting in Excel 2 August 30th 07 12:42 PM
Date and Time Formatting Daren Excel Worksheet Functions 2 June 27th 07 03:10 PM
Formatting Date/Time for NOW() Rob Excel Discussion (Misc queries) 2 April 30th 07 02:34 PM
how to include real time & date on a worksheet nde Excel Discussion (Misc queries) 1 March 23rd 05 06:43 PM


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