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: 553
Default Dynamic XY Chart no working

I have a an XY Chart that I am using to graph a histogram. I want to make
the chart dynamic so that it pulls in multiple Bins/Counts based on an Active
X Dropdown box located on the chart. I have three sets of Bins/Count. The
Bins are located in: Sheet1!$H$24:$J$43. The Counts are located in:
Sheet1!$H$45:$J$64. Now I have named (in Excel) the first column in the Bins
("BinRange" = Sheet1!$H$24:$H$43). I have also named (in Excel) the first
column in the Count range ("CountRange" = Sheet1!$H$45:$H$64). The Active X
control has a list box which generates a list of 1,2,3. Now I want to use
the listbox to pick the correct column number (1 to 3), and then use this
with an offset to pully the correct Bin/Count data range into my XY graph. I
tried recording the following routine but cannot get it towork. What am I
doing wrong here? I have assigned the macro below to the list box. Thanks

Sub Macro2()
Dim X As Integer

X = Range("ColumnCounter") 'This value is generated by Listbox 1 to 3

ActiveChart.SeriesCollection(1).XValues = Range("BinRange").Offset(0, 0)
ActiveChart.SeriesCollection(1).Values = Range("CountRange").Offset(0, 0)
ActiveChart.SeriesCollection(1).Name = Range("ChartName")
Calculate

End Sub
 
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
Dynamic stacked bar chart not working PBcorn Charts and Charting in Excel 3 October 12th 09 02:04 PM
Dynamic Chart with OFFSET defined name not working Montse Charts and Charting in Excel 2 April 1st 09 01:35 PM
Dynamic chart pasted to a new workbook in report can't be dynamic Piotr (Peter)[_2_] Charts and Charting in Excel 2 August 6th 08 05:15 AM
My Dynamic Named Range isn't working Carrie_Loos via OfficeKB.com Excel Worksheet Functions 11 February 22nd 08 10:09 PM


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