#  Other Applications & Softwares  > PowerPoint Formatting & General >  >  "Method Range of object _Worksheet failed" error message in Excel/PowerPoint VBA

## surePac

Greetings, 

I've written a macro that creates PowerPoint charts from data in an Excel workbook. 

It is nearly functional, except for a 


```
Please Login or Register  to view this content.
```


failed error message.

The macro is run in a PowerPoint instance with no slides. It creates the correct PowerPoint chart with the data from the first Excel workbook sheet, but fails at this line 


```
Please Login or Register  to view this content.
```


 when it gets to the second sheet in the Excel workbook. Specifically it says method 


```
Please Login or Register  to view this content.
```


 when I hover over the line in the VBA editor. Also, 


```
Please Login or Register  to view this content.
```


 and 


```
Please Login or Register  to view this content.
```


 still refer to the 1st worksheets data range. 

This leads me to believe that my:



```
Please Login or Register  to view this content.
```


References are not properly cycling through to the next sheet in the Excel workbook. This is weird because when I use a static range such as in 


```
Please Login or Register  to view this content.
```


, the macro goes through the sheets as it should. 

I greatly appreciate any help. My full macro is below:




```
Please Login or Register  to view this content.
```

----------


## Norie

You have no worksheet reference for Cells in the line causing the error. 

Try this. 



```
Please Login or Register  to view this content.
```

----------


## surePac

Thanks! Worked. Can't believe I missed that.

----------

