Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Excel macro that to close PowerPoint - if PPT it is open.

I have an Excel application that enable the user to export an Exccel
chart directly into PowerPoint. The macro to do this works fine
provide PowerPoint wasn't already open.

I am trying to figure the VB code so when the application opens it
automatically closes PowerPoint - if in fact PowerPoint is already
open.

Here's what I have so far but I'm getting errors ("ActiveX component
can't create object):

Sub Workbook_Open()
Dim PPApp as PowerPoint.Application
Set PPApp = PowerPoint.ActivePresentation

With PPApp
.Saved = msoTrue
.Close
end with

UF1.show
End Sub

Can anyone point me in the right direction?

Thank you,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Excel macro that to close PowerPoint - if PPT it is open.

http://word.mvps.org/faqs/interdev/c...ptfromword.htm

Works the same way from XL

Tim


"Tony Bender" wrote in message
...
I have an Excel application that enable the user to export an Exccel
chart directly into PowerPoint. The macro to do this works fine
provide PowerPoint wasn't already open.

I am trying to figure the VB code so when the application opens it
automatically closes PowerPoint - if in fact PowerPoint is already
open.

Here's what I have so far but I'm getting errors ("ActiveX component
can't create object):

Sub Workbook_Open()
Dim PPApp as PowerPoint.Application
Set PPApp = PowerPoint.ActivePresentation

With PPApp
.Saved = msoTrue
.Close
end with

UF1.show
End Sub

Can anyone point me in the right direction?

Thank you,



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Excel macro that to close PowerPoint - if PPT it is open.

Tim,

Thank you for you suggestion...it solved my problem..

Thanks again,

Tony Bender

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
open and close another app from macro John Keith Excel Programming 4 September 13th 09 09:49 PM
Macro to close embedded charts/resize in PowerPoint Barb Reinhardt Excel Programming 0 December 9th 08 03:01 PM
Open Access, Paste data to table, and close all from Excel Macro learningaccess Excel Programming 2 April 26th 07 04:04 PM
Macro to open and close an Excel file Magnivy Excel Programming 5 March 13th 06 03:29 PM
Excel macro to close powerpoint sarahl Excel Discussion (Misc queries) 1 December 2nd 05 12:06 AM


All times are GMT +1. The time now is 04:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"