Macro that opens a PowerPoint Show

henryihunter1954

Registered User.
Local time
Today, 15:07
Joined
Mar 2, 2016
Messages
89
Hello.

I need assistance in creating a macro or a button that will open a PowerPoint Show.

Would someone help me with this issue please.
 
Here's some VBA code that you could put in a command button event.

Code:
Dim strPowerPointFile As String
'Dim pptobj As PowerPoint.Application  ' for early binding use Microsoft Power Point Object Library
Dim pptobj As Object
Const msoFileDialogFilePicker = 3
'Dim fdg As FileDialog  'for early binding use Microsoft Office Objects Library
Dim fdg As Object
Set pptobj = CreateObject("PowerPoint.Application")
pptobj.Visible = True
Set fdg = Application.FileDialog(msoFileDialogFilePicker)
fdg.AllowMultiSelect = False
If fdg.Show Then
    strPowerPointFile = fdg.SelectedItems(1)
    pptobj.Presentations.Open (strPowerPointFile)
End If
Set fdg = Nothing
Set pptobj = Nothing

It will allow the user to pick a file and will open that file in Power Point. This code needs error handlers for dealing with the wrong type of file being picked, etc This just opens the Power Power Application with the selected file. If you want the Power Point presentation to appear in an Access form there are instruction on how to do that in this Web page.
 
Thank you very much.

I am going to give it a try.

This is my first time ever using a group of professionals online.

I want to thank you for your response and I'll get back with you to give you my results.
 

Users who are viewing this thread

Back
Top Bottom