However, so that you can see a more efficient way to code what you were trying to do, I've offered the code below.
Also, its really best not to use VBA when you don't have to!
If the location of either the Power Point presentation or the Excel file changes, you may have to embed the chart again in order for it to display correctly.
In most of my corporate Excel training, this part gets me a "Wow! How would you like to just update the Excel sheet and have the Power Point charts automatically update rather than having to copy the charts all over from the Excel sheet? Just at the lower right corner of the pasted chart, I see a CTRL icon.
So you make weekly or monthly Power Point presentation with charts from an Excel sheet. Just update the Excel file and refresh the charts in Power Point.
So next week/month, you don't have to delete the old charts and paste the new ones.
When you close both the Excel file and the Power Point file, the next time you open the Power Point file you will need to select the chart (by clicking on it) and go to the Design menu, and click on Refresh data to have the chart updated.
Sub Update Graphs() Dim wks As Worksheet, rng1 As Range Dim latest Row As Long ' changed to long to handle rows over 32,000 (whatever number Integer stops at) Set wks = Sheets("Daily Journey Processing") With wks latest Row = .
It very well may need some tweaks to fit your actual data set.
If you have already created a chart in Excel, you can embed and link it to your Power Point presentation.
When you embed an Excel chart in Power Point, any updates you make to the original Excel chart will automatically update in your presentation, as long as the files remain in the same location.
This helps the data stay in sync, so you won't have incorrect or out-of-date information in your chart. An Excel spreadsheet containing the chart's source data will appear.
After you have finished editing, be sure to save the chart in Excel.