Exporting Range of Data to PowerPoint

vmoore845

New Member
Joined
Oct 5, 2020
Messages
14
Office Version
  1. 2010
Platform
  1. Windows
I have an Excel Workbook with Data in A1:D16 on each worksheet in the workbook, that I want to export to PowerPoint, the data is a mini financial statement (No charts, not table, just numbers). When I run the script I get a Run-time error '424': Object Required Can you tell me what is wrong?

1602095586843.png



Sub ExportRangeToPowerPoint()

'Declare PowerPoint Object Variables
Dim PPTApp As PowerPoint.Application
Dim PPTPres As PowerPoint.Presentation
Dim PPTSlide As PowerPoint.Slide

'Declare Excel Object Variable
Dim ExcRng As Range

'Create a new instance of PowerPoint
Set PPTApp = New PowerPoint.Application
PPTApp.Visible = True

'Create a new Presentation within the Application
Set PPTPres = PPTApp.Presentations.Add

'Create a new slide within the presentation
Set PPTSlide = PPTPres.Slides.Add(1, ppLayoutTitleOnly)

'Create a reference to the Excel Range we want to Export
Set ExcRng = Range("A1:D16")

'Copy the range
ExcRng.Copy

'Paste the range in the slide
PPPTSlide.Shapes.Paste




End Sub
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
You have three P for your last PPPTSlide.Shapes.Paste change to two and it will work.
 
Upvote 0
Great, thank you. I guess I have been writing PPPL, Pay Check Protection Loans, so much it was automatic. Thank you very much.
 
Upvote 0
Happy to help and pleased to read you have resolved your code.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,742
Members
448,989
Latest member
mariah3

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