ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   POWERPOINT IN EXCEL (https://www.excelbanter.com/excel-programming/381287-re-powerpoint-excel.html)

Chip Pearson

POWERPOINT IN EXCEL
 
If you are talking about a PPT presentaiton embedded in Excel, displayed as
an icon, use code like


Dim WS As Worksheet
Dim OLEObj As OLEObject
Dim S As String
Dim N As Long

Set WS = ActiveSheet 'change if required
For Each OLEObj In WS.OLEObjects
If InStr(1, OLEObj.SourceName, "PowerPoint") 0 Then
OLEObj.Verb xlVerbPrimary
Exit For
End If
Next OLEObj


If you have named the object, you can use code like

Dim WS As Worksheet
Dim OLEObj As OLEObject
Dim PPTName As String

Set WS = ActiveSheet '<<< change if required
PPTName = "PPT1" '<<< change if required
Set OLEObj = WS.OLEObjects(PPTName)
OLEObj.Verb xlVerbPrimary



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)



"Glenn" wrote in message
...
Is there anyway to write a micro that when it starts plays a powerpoint
slide
show?





All times are GMT +1. The time now is 12:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com