Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2000 / WIN2K
================================================== ========= Thanks for looking at my request. I have a workbook with 2 sheets in it. Sheet1 is called "RawData" and Sheet2 is called "Chart". Whern you start Excel and open the book, a opopup form asks you for a date range. Once you enter a valid date range, I query SQL Server and extract the proper data and return it to RawData sheet. The number of columns remains the same but the rows can be from none to thousands. My question is how can I setup the Chart sheet to handle the changing dataset ? I'm an excellent VB programmer but cannot figure out the proper object to use to manage the chart and data. Thanks to all and happy holidays. Craig |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I just recorded a macro while changing the ranges. I've modified the Range
definition though. ActiveChart.SeriesCollection(1).XValues = Range("A1:A500") ActiveChart.SeriesCollection(1).Values = Range("B1:B500") "Craig Somberg" wrote in message ... Excel 2000 / WIN2K ================================================== ========= Thanks for looking at my request. I have a workbook with 2 sheets in it. Sheet1 is called "RawData" and Sheet2 is called "Chart". Whern you start Excel and open the book, a opopup form asks you for a date range. Once you enter a valid date range, I query SQL Server and extract the proper data and return it to RawData sheet. The number of columns remains the same but the rows can be from none to thousands. My question is how can I setup the Chart sheet to handle the changing dataset ? I'm an excellent VB programmer but cannot figure out the proper object to use to manage the chart and data. Thanks to all and happy holidays. Craig |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The object you need is the ChartObjects("chartname").Chart
and use the SeriesCollection().Values property or the .XValues property Make sure that the ranges are not empty or that will cause you lots of grief To change the axes scaling, use the .Axes(xlCategory) or ..Axes(xlSeries) or .Axes(xlValues) objects and their .MinimumScale and .MaximumScale properties (but make sure that .MinimumScale < .MaximumScale as you change them) Kevin Beckham -----Original Message----- Excel 2000 / WIN2K ================================================= ========= = Thanks for looking at my request. I have a workbook with 2 sheets in it. Sheet1 is called "RawData" and Sheet2 is called "Chart". Whern you start Excel and open the book, a opopup form asks you for a date range. Once you enter a valid date range, I query SQL Server and extract the proper data and return it to RawData sheet. The number of columns remains the same but the rows can be from none to thousands. My question is how can I setup the Chart sheet to handle the changing dataset ? I'm an excellent VB programmer but cannot figure out the proper object to use to manage the chart and data. Thanks to all and happy holidays. Craig . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying Charts While Changing Source Data | Charts and Charting in Excel | |||
Changing many charts in one worksheet | Charts and Charting in Excel | |||
Why won't my pie charts update with changing data? | Charts and Charting in Excel | |||
How can I stop charts from refreshing when changing source data? | Charts and Charting in Excel | |||
copying workbooks with charts and changing data | Charts and Charting in Excel |