DELETE A POWERPOINT SLIDE IF LINKED CELL FROM EXCEL = 0

Solutionmatt

New Member
Joined
Feb 2, 2022
Messages
16
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi All!

First timer here!

Is it possible to remove/hide PowerPoint slides if the excel cell that is linked in to the slide has it a value of 0?

I've read seen numerous VBA that will remove an array of slides based in "case"

But, really need the former........

Any help will be appreciated guys ♥️?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Yes, that's probably possible with VBA. Do you have some code already?
 
Upvote 0
the only one i have found is this below,

Sub RemoveUnwantedSlides()

Dim A() As Long

Dim I As Long

ReDim A(StartIndex To StopIndex)

For I = StartIndex To StopIndex: A(I) = I: Next

MyRange = A



'The file name and path of the file to update

sourceFileName = "C:\Users\Children.pptm"

Set pptApp = New PowerPoint.Application

Set pptPresentation = pptApp.Presentations.Open(sourceFileName)



pptApp.Activate



Dim ppSlidesArr As Variant



Select Case Range("A1").Value

Case 1

ppSlidesArr = MyRange(64, 65)



Case 2

ppSlidesArr = MyRange(85, 92)



Case 3

ppSlidesArr = MyRange(76, 83)



End Select

is there a way anyone can alter this so it deletes the slides with 0 value in linked cell?

i'll be forever in your debt guys.

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,200
Members
449,072
Latest member
DW Draft

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