Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Copy charts to powerpoint

Hi,

I have a number of charts that are control from a main data range in excel.
I have some code to write these to a number of power point slide. However,
occasionally I am getting the message:

shape (unknown member): invalid request. to select a shapem its view must
be active

My code sets the charts in a loop and then calls the same module to control
the copying - which is

'Find the open powerpoint template and make it visible
Set ppApp = GetObject(, "PowerPoint.Application")
ppApp.Visible = True
'goto the relevant slide in the presentation
Set ppSlide = ppApp.ActivePresentation.Slides(intSlideCount)
ppApp.ActivePresentation.Slides(intSlideCount).Sel ect
ppSlide.Select
'paste the chart
ppSlide.Shapes.Paste.Select
intSlideCount = intSlideCount + 1 'increase the slide count variable

It is the line ppSlide.Shapes.Paste.Select that is highlighed when debug is
selected. I cant understand this because it falls over on different slides.

Any help anyone could offer me would be gratefully received.

Many thank


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default Copy charts to powerpoint

Can you show a little more code, need to see the loop logic.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Graham Whitehead" wrote:

Hi,

I have a number of charts that are control from a main data range in excel.
I have some code to write these to a number of power point slide. However,
occasionally I am getting the message:

shape (unknown member): invalid request. to select a shapem its view must
be active

My code sets the charts in a loop and then calls the same module to control
the copying - which is

'Find the open powerpoint template and make it visible
Set ppApp = GetObject(, "PowerPoint.Application")
ppApp.Visible = True
'goto the relevant slide in the presentation
Set ppSlide = ppApp.ActivePresentation.Slides(intSlideCount)
ppApp.ActivePresentation.Slides(intSlideCount).Sel ect
ppSlide.Select
'paste the chart
ppSlide.Shapes.Paste.Select
intSlideCount = intSlideCount + 1 'increase the slide count variable

It is the line ppSlide.Shapes.Paste.Select that is highlighed when debug is
selected. I cant understand this because it falls over on different slides.

Any help anyone could offer me would be gratefully received.

Many thank



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Copy charts to powerpoint

There really isnt much to the loop just setting headings to display the
appropraite information to populate the charts - and the copy and paste
module is called

For x = 1 To 7
Windows(wbSourceWB).Activate
Sheets("Data Comparison").Select
Range("D2").Value = arrGlobalChannel(2)
Range("D3").Value = arrMidChannel(1)
Range("D5").Value = arrTopEvType(6)
Range("D6").Value = arrBottomEvType(x)
Call Copy_Charts(This_Sheet, intSlideCount, ppApp, ppSlide,
wbSourceWB)
Next x

"John Bundy" (remove) wrote in message
...
Can you show a little more code, need to see the loop logic.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Graham Whitehead" wrote:

Hi,

I have a number of charts that are control from a main data range in

excel.
I have some code to write these to a number of power point slide.

However,
occasionally I am getting the message:

shape (unknown member): invalid request. to select a shapem its view

must
be active

My code sets the charts in a loop and then calls the same module to

control
the copying - which is

'Find the open powerpoint template and make it visible
Set ppApp = GetObject(, "PowerPoint.Application")
ppApp.Visible = True
'goto the relevant slide in the presentation
Set ppSlide = ppApp.ActivePresentation.Slides(intSlideCount)
ppApp.ActivePresentation.Slides(intSlideCount).Sel ect
ppSlide.Select
'paste the chart
ppSlide.Shapes.Paste.Select
intSlideCount = intSlideCount + 1 'increase the slide count variable

It is the line ppSlide.Shapes.Paste.Select that is highlighed when debug

is
selected. I cant understand this because it falls over on different

slides.

Any help anyone could offer me would be gratefully received.

Many thank





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Copy charts to powerpoint

Take a look at this:
http://www.ozgrid.com/forum/showthread.php?t=34916

Regards,
Ryan---


--
RyGuy


"Graham Whitehead" wrote:

There really isnt much to the loop just setting headings to display the
appropraite information to populate the charts - and the copy and paste
module is called

For x = 1 To 7
Windows(wbSourceWB).Activate
Sheets("Data Comparison").Select
Range("D2").Value = arrGlobalChannel(2)
Range("D3").Value = arrMidChannel(1)
Range("D5").Value = arrTopEvType(6)
Range("D6").Value = arrBottomEvType(x)
Call Copy_Charts(This_Sheet, intSlideCount, ppApp, ppSlide,
wbSourceWB)
Next x

"John Bundy" (remove) wrote in message
...
Can you show a little more code, need to see the loop logic.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Graham Whitehead" wrote:

Hi,

I have a number of charts that are control from a main data range in

excel.
I have some code to write these to a number of power point slide.

However,
occasionally I am getting the message:

shape (unknown member): invalid request. to select a shapem its view

must
be active

My code sets the charts in a loop and then calls the same module to

control
the copying - which is

'Find the open powerpoint template and make it visible
Set ppApp = GetObject(, "PowerPoint.Application")
ppApp.Visible = True
'goto the relevant slide in the presentation
Set ppSlide = ppApp.ActivePresentation.Slides(intSlideCount)
ppApp.ActivePresentation.Slides(intSlideCount).Sel ect
ppSlide.Select
'paste the chart
ppSlide.Shapes.Paste.Select
intSlideCount = intSlideCount + 1 'increase the slide count variable

It is the line ppSlide.Shapes.Paste.Select that is highlighed when debug

is
selected. I cant understand this because it falls over on different

slides.

Any help anyone could offer me would be gratefully received.

Many thank






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
Build custom charts in Excel and copy them to PowerPoint mustang25 Excel Programming 7 May 20th 10 05:19 PM
Copy/Paste Charts; Define Destination of Charts in PowerPoint ryguy7272 Excel Programming 2 January 24th 08 08:04 PM
copy Excel charts to PowerPoint and Word Cesar Camargos Excel Programming 0 February 16th 07 06:33 PM
Copy Charts from Excel worksheet to PowerPoint Koulla Excel Programming 3 October 30th 06 02:28 PM
Macro to copy Excel charts to existing Powerpoint file [email protected] Excel Programming 1 September 18th 06 08:32 PM


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

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

About Us

"It's about Microsoft Excel"