Hello Excel Forum,

I'm new to the forum and have the following challenge:

I found the following macro that works extremely well for Excel to PPT conversion (sorry don't know the author so I can't cite the source!):
Please Login or Register  to view this content.
Sub UsedRangePPT()

Dim objPPT As Object
Dim shtTemp As Object
Dim intSlide As Integer

Set objPPT = CreateObject("Powerpoint.application")
objPPT.Visible = True
objPPT.Presentations.Add
objPPT.ActiveWindow.ViewType = 1 'ppViewSlide


For Each shtTemp In ThisWorkbook.Sheets
shtTemp.Range("A1", shtTemp.UsedRange).CopyPicture xlScreen, xlPicture
intSlide = intSlide + 1
' new slide for each chart
objPPT.ActiveWindow.View.GotoSlide Index:=objPPT.ActivePresentation.Slides.Add(Index:=objPPT.ActivePresentation.Slides.Count + 1, Layout:=12).SlideIndex
objPPT.ActiveWindow.View.Paste
With objPPT.ActiveWindow.View.Slide.Shapes(objPPT.ActiveWindow.View.Slide.Shapes.Count)
.Left = (.Parent.Parent.SlideMaster.Width - .Width) / 2
End With
Next

Set objPPT = Nothing
End Sub
Please Login or Register  to view this content.

I am using the following:
- MS Excel 2007
- Windows XP

My questions ares:
1. How do I change the above macro to only export a specific range into powerpoint? When I run this macro, it exports all sheets used with the total range used within each sheet.
2. My workbook has 25 sheets but I only want 19 sheets to export. The other 6 sheets are reference or data tabs not for presentation. How do I limit the sheets to export?
3. How do I format each sheet to fit properly onto a slide within the macro or does this need to be handled manually?

Thanks!