runtime error in odd place

men5j2s

Board Regular
Joined
Apr 26, 2016
Messages
59
Office Version
  1. 365
Platform
  1. Windows
This part of my macro stops at line 6 below, where it throws up a runtime error...

There is no reason why it wont work as its an exact cope of line 2, but references the next column in a spreadsheet nd is for n additional series..

any ideas?

Code:
    ActiveChart.SeriesCollection.NewSeries                                                                  
    ActiveChart.FullSeriesCollection(1).Name = "='" & Left(Device, 31) & "'!R1C9"             
    ActiveChart.FullSeriesCollection(1).XValues = "='" & Left(Device, 31) & "'!R3C8:R" & LastRow & "C8"    
    ActiveChart.FullSeriesCollection(1).Values = "='" & Left(Device, 31) & "'!R3C9:R" & LastRow & "C9"    
 
    ActiveChart.FullSeriesCollection(2).Name = "='" & Left(Device, 31) & "'!R1C10"
    ActiveChart.FullSeriesCollection(2).XValues = "='" & Left(Device, 31) & "'!R3C8:R" & LastRow & "C8"
    ActiveChart.FullSeriesCollection(2).Values = "='" & Left(Device, 31) & "'!R3C10:R" & LastRow & "C10"
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I've just found out that when you add a 1st series to a chart and go to name it and click the button tht takes you to the data location, it defaults to the lcation of the data. when adding a second series, it does not, you must actively click on the original tab then select the cell you want.

does this mean that i need to point it to the sheet too?

how would i tell it which sheet to use? I assume it would be t the last part of the code on line 6 " ' ! R1C10"
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top