Reputation: 245
I'm aware that there are several posts regarding this Run-time error '438', but I still can't figure out how to fix this. This is my entire code: https://pastebin.com/S6LigcWz but the part in question is this:
With c.ChartData
.Activate
.Workbooks.Sheets(1).UsedRange.Clear
.Workbooks.Sheets(1).Range(A2).Select
.Selection.PasteSpecial xlPasteValues
.Workbooks.Close
End With
This code starts in ppt then goes into excel and copies a range then "tries" to paste into a chart in ppt. This is the part of the code where it's trying to paste into the chart, and the part where the error occurs. It errors on .Workbooks.Sheets(1).UsedRange.Clear
Any help is appreciated.
Upvotes: 0
Views: 121
Reputation: 548
I would take the dots off the beginning of the Workbooks
because ChartData
doesn't have a Workbooks
member
Upvotes: 2