MS PowerPoint VBA Interview Questions and Answers with Examples

Home/100+ VBA Interview Questions and Answers with Examples/MS PowerPoint VBA Interview Questions and Answers with Examples

MS PowerPoint VBA Interview Questions and Answers with Examples

MS PowerPoint VBA Interview Questions and Answers explained with Example macros. Here are the list of most frequently asked basic MS PowerPoint VBA interview questions. All the questions are answered with simple examples. These questions will help you to answer basic questions to deal with MS PowerPoint VBA Programming/Development.

PREMIUM TEMPLATES LIMITED TIME OFFER

ON SALE80% OFF

50+ Project Management Templates Pack
Excel PowerPoint Word

Advanced Project Plan & Portfolio Template
Excel Template

Business Presentations Templates Pack
PowerPoint Slides

20+ Excel Project Management Pack
Excel Templates

20+ PowerPoint Project Management Pack
PowerPoint Templates

10+ MS Word Project Management Pack
Word Templates


Here is the following VBA procedure or macro to create new PowerPoint Presentation.

Sub Create_Presentation()
Presentations.Add
End Sub
Here is the following VBA procedure or macro to add slide in a presentation.

Sub Create_Presentation_WithSlide_Ex1()
With Presentations.Add
.Slides.Add Index:=1, Layout:=ppLayoutTitle
End With
End Sub
'Or
Sub Create_Presentation_WithSlide_Ex2()
With Presentations.Add
.Slides.Add 1, 1
End With
End Sub
Here is the following VBA procedure to create new PowerPoint Presentation and add slide.

'Create new PowerPoint Presentation and add slide
Sub Create_Presentation_WithSlide_Ex2()
With Presentations.Add
.Slides.Add 1, 1
End With
End Sub
Here is the following macro to save PowerPoint Presentation.

Sub Create_Save_Presentation()
'Variable Declaration
Dim NewPres As Presentation
'Create new Presentation
Set NewPres = Presentations.Add
'Your statements do something
'Save Presentation in a folder
NewPres.SaveAs FileName:="d:/TestPresentation.pptx"
End Sub
Here is the following macro to delete 1st slide in a PowerPoint Presentation.

Example 1:

Sub DeleteSlide_Presentation_Ex1()
ActivePresentation.Slides(1).Delete
End Sub

Example 2:

'Delete 3rd slide in a presentation
Sub DeleteSlide_Presentation_Ex2()
ActivePresentation.Slides(3).Delete
End Sub
Here is the following code to duplicate 1st slide in a presentation.
Example 1:

'Duplicate 1st slide in a presentation
Sub DuplicateSlide_Presentation_Ex1()
ActivePresentation.Slides(1).Duplicate
End Sub

Example 2:

'Duplicate 3rd slide in a presentation
Sub DuplicateSlide_Presentation_Ex2()
ActivePresentation.Slides(3).Duplicate
End Sub
Here is the following code to move slide from position one to three in a presentation.

Example 1:

'Move slide from position one to three in a presentation
Sub Move_Slide_Ex1()
ActivePresentation.Slides(1).MoveTo topos:=3
End Sub

Example 2:

'Move slide from position four to two in a presentation
Sub Move_Slide_Ex2()
ActivePresentation.Slides(4).MoveTo topos:=2
End Sub
Here is the following code to copy slide and Paste it in another location in a presentation.

'Copy third slide and Paste it as a first slide in a presentation
Sub CopyPaste_Slide()
ActivePresentation.Slides(3).Copy
ActivePresentation.Slides.Paste Index:=1
End Sub
Here is the following code to access a slide by its name in a presentation.

'Access a slide by its name
Sub Access_Slide_ByName()
ActivePresentation.Slides(2).Name = "Title"
ActivePresentation.Slides("Title").Select
End Sub
Here is the following code to access a slide by its index number in a presentation.

'Access a slide by its index number
Sub Access_Slide_ByIndex()
ActivePresentation.Slides(4).Select
End Sub
Here is the following procedure to start a slide show.

'Start a slide show
Sub Satrt_SlideShow()
ActivePresentation.SlideShowSettings.Run
End Sub
Here is the following procedure to exit a slide show.

'Exit a slide show
Sub Exit_SlideShow()
ActivePresentation.SlideShowWindow.View.Exit
End Sub
Here is the following procedure to display previous side in a presentation.

'Display previous side
Sub Display_PreviousSlide()
ActivePresentation.SlideShowWindow.View.Previous
End Sub
Here is the following procedure to display next side in a presentation.

'Display next side
Sub Display_NextSlide()
ActivePresentation.SlideShowWindow.View.Next
End Sub
Here is the following procedure to display first side in a presentation.

'Display first side
Sub Display_FirstSlide()
ActivePresentation.SlideShowWindow.View.First
End Sub
Here is the following procedure to display last side in a presentation.

'Display last side
Sub Display_lastSlide()
ActivePresentation.SlideShowWindow.View.Last
End Sub

Here is the link for more VBA Interview Questions and Answers. These are explained for examples.
100+ VBA Interview Questions

LIMITED TIME OFFER

Related pages


vba beginners tutorialhyperlink in vbahlookup example in excelxl file openerexample of vlookup in excel 2010sas macro loopstask timeline templatesave excel file vbavba range variableadvanced filter in excel vbahow do you unhide columns in excel 2010vlookup basicsexcel chart add instask excel templateexcel vba select cellhow to merge cells in excel 2013excel vba goto labelhow to remove duplicates in excel sheetremove blank rows in excelvba activate workbookchange width of column in excel 2010using sql in vbaproject costing excel templatevba rangesexport xlsx to xmltesting interview questions and answers for experienced pdfunprotect an excel worksheetcall excel function in vbalookups in exceldeclaring variables in vbaexcel formula substitutedownloadable gantt chartvba selecting a cellmicrosoft excel multiple if statementshow to run a macro in excel 2007unlock workbooklookup excelinsert shortcut key excelvlookup function excel 2007vba excel case statementvba multiple if statementsexcel hyperlink to fileexcel vba switch casemerge cells excel 2007vba datatypesvba coding in excel for beginnersvb dialog boxexcel vba isnahow to use nested if statements in excellooping vbahow do you create a macro in excelminutes template microsoft wordproject schedule template powerpointautofit cells in excelexcel 2013 slicer tutorialascending and descending order worksheetshow to write excel macrosvba combobox exampletrim function in excel vbaremove empty lines excelsimple vba codemultiple if statements in excel formulauseful excel spreadsheetsddl and dml in sqlexcel delete blank rowspivot table instructionswriting a macro for excelhyperlink macrocell reference range excelunprotect sheet excel 2013access vba if statementexcel pivot table basicschart wizard in excel 2007loop vba codeexcel 2007 all formulas with examples