Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default 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
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
Keeping Custom Chart Settings Jim at Clark Charts and Charting in Excel 1 November 30th 07 01:22 PM
are user-defined chart settings transferrable? Ed Ireland Setting up and Configuration of Excel 0 February 15th 06 07:26 PM
Change default settings for surface chart legend rmellison Charts and Charting in Excel 2 January 11th 06 09:19 AM
colorIndex listing for Chart with autoformat settings Jean Ruch Charts and Charting in Excel 2 October 14th 05 08:55 AM
How can I store individual chart settings lschuh Charts and Charting in Excel 0 October 11th 05 05:10 PM


All times are GMT +1. The time now is 09:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"