Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
chart settings
VBA does not like my syntax on the variables in the last
two lines. Please tell me what I am doing wrong: Sub ONEDAY() Dim maxrow As Integer Dim onedayopen As Integer maxrow = Sheets("DATA").[AA1].Value onedayopen = maxrow - 4000 ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.SeriesCollection(1).XValues = "=DATA! RonedayopenC1:RmaxrowC1" ActiveChart.SeriesCollection(1).Values = "=DATA! RonedayopenC12:RmaxrowC12" End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
chart settings
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).XValues = _ "=DATA!R" & onedayopen & "C1:R" & maxrow & "C1" ActiveChart.SeriesCollection(1).Values = _ "=DATA!R" & onedayopen & "C12:R" & maxrow & "C12" -- Regards, Tom Ogilvy "Paul" wrote in message ... VBA does not like my syntax on the variables in the last two lines. Please tell me what I am doing wrong: Sub ONEDAY() Dim maxrow As Integer Dim onedayopen As Integer maxrow = Sheets("DATA").[AA1].Value onedayopen = maxrow - 4000 ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.SeriesCollection(1).XValues = "=DATA! RonedayopenC1:RmaxrowC1" ActiveChart.SeriesCollection(1).Values = "=DATA! RonedayopenC12:RmaxrowC12" End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
chart settings
thanks Tom
-----Original Message----- ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.SeriesCollection(1).XValues = _ "=DATA!R" & onedayopen & "C1:R" & maxrow & "C1" ActiveChart.SeriesCollection(1).Values = _ "=DATA!R" & onedayopen & "C12:R" & maxrow & "C12" -- Regards, Tom Ogilvy "Paul" wrote in message ... VBA does not like my syntax on the variables in the last two lines. Please tell me what I am doing wrong: Sub ONEDAY() Dim maxrow As Integer Dim onedayopen As Integer maxrow = Sheets("DATA").[AA1].Value onedayopen = maxrow - 4000 ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.SeriesCollection(1).XValues = "=DATA! RonedayopenC1:RmaxrowC1" ActiveChart.SeriesCollection(1).Values = "=DATA! RonedayopenC12:RmaxrowC12" End Sub . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Keeping Custom Chart Settings | Charts and Charting in Excel | |||
are user-defined chart settings transferrable? | Setting up and Configuration of Excel | |||
Change default settings for surface chart legend | Charts and Charting in Excel | |||
colorIndex listing for Chart with autoformat settings | Charts and Charting in Excel | |||
How can I store individual chart settings | Charts and Charting in Excel |