If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Line chart - time series - category axis date format (2007 VBA)
I'm using VBA in Excel 2007 to plot time series as line charts (i.e., data on
Y axis, dates on X axis, ChartType = xlLineMarkers). My data's not in a neat "block", so I can't use the ChartWizard or SetSourceData methods. For Y-axis data I'm using: With ActiveChart ..SeriesCollection.Add Source:= [a range variable with my data] How do I set up the X-Axis so that I can format the dates? I've tried: ..Axes(xlCategory).CategoryType = xlTimeScale ..Axes(xlCategory).CategoryNames = [a range variable which is a column of dates] However, Excel treats the CategoryNames as strings. CategoryType appears to be ignored. Anyone know what I'm doing wrong? |
Thread Tools | |
Display Modes | |
|
|