Hi All,
I want to copy from Excel (Filtered Range) and paste in power point slide
Each copied Range in separate Slide . Like this I want to loop this action (Count is not fixed).
So far I've below code. which is not working as expected.
I want to copy from Excel (Filtered Range) and paste in power point slide
Each copied Range in separate Slide . Like this I want to loop this action (Count is not fixed).
So far I've below code. which is not working as expected.
Code:
For Each Ccell In Worksheets("RAWDATA").Range("H2:H10")
slidecount = myPresentation.slides.Count
Set PPSlide = myPresentation.slides.Add(slidecount + 1, 12)
rcnt = Worksheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row
Set tbl = Worksheets("Sheet1").Range("A1:E" & rcnt)
Worksheets("Sheet1").Activate
Worksheets("Sheet1").Range("A1:E" & rcnt).AutoFilter
tbl.AutoFilter 1, Criteria1:=Ccell
tbl.SpecialCells(xlCellTypeVisible).Copy
PPSlide.Shapes.PasteSpecial DataType:=2 '2 = ppPasteEnhancedMetafile
Next ccell