View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default excel VBA for auto open PowerPoint


Try this Koataus

Sub test()
On Error Resume Next
Set xl = GetObject(, "Excel.Application")
If xl Is Nothing Then
Set xl = GetObject("", "Excel.Application")
xl.workbooks.Open "c:\Data\book1.xls"
xl.UserControl = True
xl.Visible = True
End If
AppActivate "Microsoft Excel"
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Koataus" wrote in message ...
Can this same concept be used to open a specific Excel file from with in
Access?

Thanks,
Koataus

"Ron de Bruin" wrote:

Hi Duncan

Try this

Dim pwp As Object
Set pwp = CreateObject("PowerPoint.Application")
pwp.Visible = True
pwp.presentations.Open Filename:="c:\test.ppt"


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Duncan_J" wrote in message ...
I know it can be done. I had the code once. Anyway, I can copy and paste
excel to Powerpoint with an excel macro.. But I want the powerpoint to launch
from excel as if you clicked on the PPT icon...
Any ideas...
Thanks
DJ