Dialog Boxes

F

FGM

I am using excel to send charts to powerpoint. I can send it to a new
powerpoint with:
Set xlapp = Excel.Application
Set xlwb = xlapp.ActiveWorkbook
Set pptapp = New PowerPoint.Application
pptapp.Visible = True
Set pptpres = pptapp.Presentations.Add

However, I want to open an existing power point and wonder if it has a
dialog method as excel does:
Set xlapp = Excel.Application
sFilename = xlapp.GetOpenFilename("xls (*.xls),*.xls")
Set xlwb = xlapp.Workbooks.Open(sFilename)

Thanks for any help you can give me.
 
J

John Wilson

I don't think there's anything that simple in powerPoint but this might do it
for you:

Sub chex()
Dim fdialog As FileDialog
Dim sfilename As String
Set fdialog = Application.FileDialog(msoFileDialogFilePicker)

With fdialog
.InitialView = msoFileDialogViewDetails
.AllowMultiSelect = False
.Title = "Please Open your Presentation"
.Filters.Clear
.Filters.Add "PowerPoint Presentations", "*.*.ppt,*.pptx"
If .Show = True Then
sfilename = .SelectedItems(1)
Else: Exit Sub ' cancel pressed
End If
End With
Presentations.Open (sfilename)
End Sub
--
Amazing PPT Hints, Tips and Tutorials

http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
_______________________________

We''re at PPTLive - see you there?
www.pptlive.com
 
F

FGM

John Wilson said:
I don't think there's anything that simple in powerPoint but this might do it
for you:

Sub chex()
Dim fdialog As FileDialog
Dim sfilename As String
Set fdialog = Application.FileDialog(msoFileDialogFilePicker)

With fdialog
.InitialView = msoFileDialogViewDetails
.AllowMultiSelect = False
.Title = "Please Open your Presentation"
.Filters.Clear
.Filters.Add "PowerPoint Presentations", "*.*.ppt,*.pptx"
If .Show = True Then
sfilename = .SelectedItems(1)
Else: Exit Sub ' cancel pressed
End If
End With
Presentations.Open (sfilename)
End Sub
--
Amazing PPT Hints, Tips and Tutorials

http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
_______________________________

We''re at PPTLive - see you there?
www.pptlive.com

Hi,
thank you....
i found out I could do this....

Set xlapp = Excel.Application
sFilename = xlapp.GetOpenFilename("xls (*.xls),*.xls")
Set xlwb = xlapp.Workbooks.Open(sFilename)
sPath = xlwb.Path

sFilename = Application.GetOpenFilename("ppt(*.ppt),*.ppt")

Set pptapp = CreateObject("PowerPoint.Application")
pptapp.Visible = True
Set pptpres = pptapp.Presentations.Open(sFilename)


I will review yours too...... hope my posting might help you or someone.
This help and all help is so appreciated....
thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top