PDA

View Full Version : Presentation in UserForm



metev
11-30-2007, 03:21 AM
Hi guys,

Do you know how to play a .pps(PowerPoint Slideshow) File in a UserForm. Is there any tool for that?

10x
metev

MWE
11-30-2007, 09:02 AM
Hi guys,

Do you know how to play a .pps(PowerPoint Slideshow) File in a UserForm. Is there any tool for that?

10x
metev an interesting question ... why do you wish to play it IN the UserForm? I would think that the reduction in display size would be a disadvantage. Would it be acceptable to have a button on the userform which when clicked fires up the PowerPoint Slideshow? If so, this could be done using a simple hyperlink approach. In the example below, the file is a pdf and the result is Adobe Acrobate starting up and displaying the pdf file; but the method works for any file type.

Private Sub cmdbtnShowFile_Click()

Dim strAddress As String

On Error Goto NoFile
strAddress = "D:\test.pdf"
ActiveWorkbook.FollowHyperlink Address:=strAddress
Exit Sub

NoFile:
MsgBox "Sorry. File is not available at this time", vbInformation, "MA Tools Utilities"

End Sub
I use this approach a lot in UserForms to display help files. It is very easy to implement and bypasses shell stuff and considerations re the correct application to start and its location.

When the number of different files that could be displayed is greater than "a few", multiple buttons gets messy, so I either have a single button that hyperlinks to a file where additional hyperlinks reside for the various possible targets or have a list box in the UserForm that contains the various possible targets. When a target is selected from the list box, the background code builds the appropriate hyperlink and the relevant target file is displayed.

Hope this helps

metev
11-30-2007, 09:36 AM
10x,

have you ever used the webbrowser control?
Because I read in a forum that I can save my .pps file as a WebPage a then show it in my UF.

your solution works fine!!
10x once again