How do I highlight all the context area?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I do have a macro that let user select an excel file and create a chart.
However, I am unable to run the chart without knowing the number of rows in
the worksheet.

Here is what I have:

ActiveChart.SetSourceData Source:=Sheets("Sheet1"). _
Range("A1:C374"), PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="Chart1"

The Range("A1:C374") is changing based on the file. How do I get those
dynamically?

Thanks.
le9569
 

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

Back
Top