Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Chart Object Model
I'm trying to programically (from VB) udate the column
lables on a chart. I can create the chart (daily values for the week) which creates 5 columns. I need to access the property that will let me label each column with the respective day. If I modify an existing chart I can right click on it, go to Source Data, then the Series tab and supply the range in "Category (X) axis labels". I can't seem to figure out what property/method this is in the chart object model so I can dynaically assign these values. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Chart Object Model
Turn on the macro recorder (tools=Macro=record a new macro) while you make
that change manually. Then turn it off and look at the recorded code. That should give you a good start. I would expect the XValues property. -- Regards, Tom Ogilvy "Joe Maki" wrote in message ... I'm trying to programically (from VB) udate the column lables on a chart. I can create the chart (daily values for the week) which creates 5 columns. I need to access the property that will let me label each column with the respective day. If I modify an existing chart I can right click on it, go to Source Data, then the Series tab and supply the range in "Category (X) axis labels". I can't seem to figure out what property/method this is in the chart object model so I can dynaically assign these values. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Chart Object Model
"Joe Maki" wrote:
I'm trying to programically (from VB) udate the column lables on a chart. Try the XValues property of the SeriesCollection for the bars. Something like ActiveChart.SeriesCollection(1).XValues = "=Sheet1!R1C1:R1C5" Using the right series collection, of course. You can assign a Range or an Array to the XValues property. ActiveChart.SeriesCollection(1).XValues = _ Array("Tue", "Wed", "Thu", "Fri", "Sat") Usually, you can record a macro to get the names of object properties like this. What a recorded macro won't tell you are the quirks of properties like XValues. For example, you can assign a Range or an Array to XValues, but when you read it, you get an Array, regardless of how it was set. There's no way, for example, to tell what Range has been assigned to XValues. But you may not need that here. --Shawn |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Chart Object Model
ActiveChart.SeriesCollection(1).XValues = "=Sheet1! R1C1:R1C5" ActiveChart.SeriesCollection(1).XValues = _ Array("Tue", "Wed", "Thu", "Fri", "Sat") I was able to get the array to work, not the range. Thanks for the help, this at least makes it possible. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Chart Object Model
-----Original Message----- Turn on the macro recorder (tools=Macro=record a new macro) while you make Great tip, I've never used macro recorder. Time to experiment <g |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel object model | Excel Programming | |||
object model diagram | Excel Programming | |||
Where is the complete Object Model | Excel Programming | |||
Subtotals in object model? | Excel Programming | |||
Does MS Query have an object model | Excel Programming |