Vba for PowerPoint

Malcolm torishi

Board Regular
Joined
Apr 26, 2013
Messages
219
Hi
i know this is an excel site but I need some help with VBA Code in PowerPoint. What I have are a number of checkboxes on my first PowerPoint slide presentation eg checkbox 1 = slide 1 checkbox 2= slide 2 and so on. I have 50 slides and 50 checkboxes. I also have 1 command button under the check boxes. What I wold like to know is the VBA Code so when I press the command button it deletes all the slide which has not been ticked in the checkboxes thanks
 

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
What type of check box have you added? Which version of PowerPoint are you using? Have you looked at the Object Browser in the PowerPoint VBA.
 
Upvote 0
I am using 2010, the check boxes are the only ones I think you can use from the developer tab. No I have not looked at the object browser .
 
Upvote 0
I have used a userform from PowerPoint VBA added to Check boxes and a command button to the form. Named the check boxes chk1 and chk2 behind the command button used the following code:

If Me.chk1.Value = True Then
ActivePresentation.Slides(2).Delete
End If
 
Upvote 0
Still need some help here please. I have tried Trevor's code above, but what I want the checkbox to do when ticked is keep the slide not delete it. Also another thing I need it to do is delete multiple slide numbers in one go UVA a command button. Please can any one help thank you
 
Upvote 0
Have you tried change the code from True to False that will delete the slides where the check boxes hasn't been ticked. Rather than have 50 if statements you could look at using a Dim Boolean code line.
 
Upvote 0

Forum statistics

Threads
1,225,662
Messages
6,186,290
Members
453,348
Latest member
newbieBA

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