Private Sub Business_Plan_Change()
Workbooks.Open Filename:="F:\Reports\" & Business_Plan.Value & ".ppt"
End Sub
To open a PPT presentation by running code in Excel, you need to do four
things - add a reference to the powerpoint object model, boot powerpoint,
make powerpoint visible, and then open the file you want.
To add the reference:
Open VBE (Alt F11)
Tools / References
Scan down for "Microsoft Powerpoint <version> Object Library"
Check the box
Click OK
Once you've added the reference, the following code should do what you want:
Private Sub Business_Plan_Change()
Dim PPT As PowerPoint.Application
Set PPT = New PowerPoint.Application
PPT.Visible = True
PPT.Presentations.Open Filename:="F:\Reports\" & Business_Plan.Value &
".ppt"
End Sub
Hope that helps.
- Andy Tischaefer
Test Lead, Microsoft Office
This posting is provided as is, and confers no rights.
"hurlbut777" <hurlb...@discussions.microsoft.com> wrote in message
news:D7CD2EFB-71B9-4A77...@microsoft.com...
dim filepath as string
filepath = "F:\Reports\" & Business_Plan.Value & ".ppt"
and then verify that filepath is what you expect to be, and that it is
pointing to a valid file.
Hope that helps.
- Andy Tischaefer
Test Lead, Microsoft Office
This posting is provided as is, and confers no rights.
"hurlbut777" <hurlb...@discussions.microsoft.com> wrote in message
news:82196349-0A5D-444B...@microsoft.com...