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


protect worksheet excelcool excel dashboardsms project templates 2010excel form macrocell height excelsorting sqlhow to run a macro in excel 2007excel combine worksheets into one sheetexcel template gantt chartexcel 2010 vba select casesql aptitude questions with answersbusiness analyst interview questions and answers pdfmeaning of offset in hindidelete row based on cell value vbachanging row to column in exceliserror excel 2010advanced charting in excelcase when vbadrop down menu vbams excel vlookupexcel vba printexcel vba copy rangevba protect workbooklinking pivot tablesexcel vba convert column number to letterhow to unlock cells in excel 2007how to delete hyperlink in excelhow to unhide all rows in excelexcel vba copy rowexcel match vbaenableevents vbahow to learn excel macro programmingrange properties vbasubstitute in vbaprotect sheet vbainsert a row above the selected rowcreating excel macroconcatenate formula in excel 2007free resource planner excel templatehyperlink cells in excelexamples of gantt charts in excelvb rangeexcel functions tutorial with exampleshow to unprotect excel workbookvba combobox listvba connection string sql serverglobal variables vbavba excel sumifmsgbox vbcriticalhow to run an excel macroproject timeline excel templateexcel 2007 lock cellsremove empty cells exceldelete blanksmsgbox vbyesnovb code to open a filemacros programming in excelmacro unprotect sheetmultiple if excel formulaautofit on excelvba loop forexcel vba sample codedelete rows in excel using vbadim worksheetexcel insert row with formulavb function syntaxworkbooks.savedelete worksheet excelexcel 2013 unprotect workbookinput box in vbavba excel for beginnersexcel trend analysis templatevba expertsconversion of excel to xmlvba closeexcel spreadsheet test for interviewmacros in excel 2007 tutorial pdf