Charting problem in Excel VBA

  • Thread starter Thread starter sumathi
  • Start date Start date
S

sumathi

Hi,
i have 2 worksheets. In the first sheet i have a combo
and a button ,depending on the values that i select in
the combo and when the button is clicked i will be getting
the values in the second sheet. I have implemented the
above scenario by associating a sql query with the
particular cell in the second sheet.On any change in
selection made in the first sheet we change the command
text of the query dynamically and we try to refreash the
workbook.We have a chart in the second sheet whose source
data should point to the resultset as obtained by the
embedded query as said above.Now the problem is that if
the query returns less than 2 records the graph seems to
get updated properly but when i select the source data of
the graph and again reselect the selected option of the
series in property and click on "OK" the structure of the
graph is getting disturbed.i.e Select the graph -->Source
Data-->Click on the the selected value (either row or
column).Can some one help on this?

Thanks and Regards,
Sumathi
 
The first part of your explanation was easy to understand. Then, you
lost me with "the structure of the graph is getting disturbed." What
does that mean?

Also, you might want to create a chart that automatically adjusts to
your data. For more on this see the Excel/Tutorials/Dynamic Charts
page of my web site.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Back
Top