LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Assigning a Range to

Why won't excel let me assign the X and Y values for my
graph dynamically???? It is this line that is erroring
out:
XValues = "=Query!R" & CStr(x1) & "C1:R" & CStr(x2) & "C1"


Related Code:
x1 = IVSLH2Range.Row + 1 'Dynamic Row Assignment -
Starting Row Number
x2 = IVSLH2Range.Row + intRowCountIVSLH2 - 1 'Dynamic
Row Assignment - Ending Row Number

XValues = "=Query!R" & CStr(x1) & "C1:R" & CStr(x2) & "C1"
YValues = "=Query!R" & CStr(x1) & "C5:R" & CStr(x2) & "C5"

'Update Graph
Sheets("Chart2").Select
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(1).XValues = XValues
ActiveChart.SeriesCollection(1).Values = YValues

 
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
Assigning a Number Based on a Range. TwinkEles Excel Worksheet Functions 4 December 8th 08 12:47 AM
Assigning a Number Based on a Range. TwinkEles Excel Worksheet Functions 1 December 6th 08 02:57 PM
Assigning Variable Range JMay Excel Discussion (Misc queries) 1 July 7th 07 04:52 PM
Assigning scores to a date range Koen Excel Worksheet Functions 1 October 20th 05 12:37 PM
Assigning ranges for values (e.g., $1,005 the range is ">$1K to 5K jennifer Excel Worksheet Functions 1 August 11th 05 02:09 PM


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