Charts in VB

S

stendahl_jones

Hi! I am writing a macro for an Excel spreadsheet. I am trying to make charts
that are variable in the sense that the program searches the spreadsheet for
certain details that are supposed to be in the charts. Thus I cannot use
fixed cell reference. Now my y-axis is wrong since I do not know how to
choose the appropriate columns that are supposed to be in the chart. Is there
any way of defining a range for a chart in various sections? By this I mean
that you can specify that first you want the area from A1:D1 and then you
want to include the area from F1:J1? My code now is:

ActiveChart.SetSourceData Source:=Sheets("Indata").Range(rng1.Address,
rng1.Offset(i, j).Address), PlotBy:=xlColumns

and it is ...Range(.....) that is wrong. Help needed as well as wanted!
Please!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top