• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA selecting a table and chart from excel to PPT

enowapi

New Member
Hi,


I am wondering if anyone would be able to help with copying a workbook of excel tables and charts into PPT?


I was able to get the code to work to copy the table (range D3 to V21) into ppt, however, when I added in the following code I got a Compile error (invalid Next control variable reference in step 8:


'Copy the chart and paste it into the PowerPoint as a Metafile Picture

xlwksht.Select

For Each cht In xlwksht.ChartObjects

cht.Activate

ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture

PPSlide.Shapes.Paste.Select


I tried various way to select a chart on the worksheet, but none seems to work. Any help is appreicated.


https://www.dropbox.com/s/jl14nqt3r88j47h/Model%20Export%20macro%20test.xlsm


A sample file is attached for reference. Thank you.
 
Hi, enowapi!


Am I wrong or this topic is the same (or highly related) as this one?

http://chandoo.org/forums/topic/export-excel-tab-to-pdf-and-ppt


If I'm wrong, please discard this message, otherwise please be gentle and answer or comment a two months old response to your previous post before starting a new thread where you should have went on the same one instead of starting this one.


Once again, if I'm not wrong, what you're doing "is called cross-posting and is generally frowned upon in the Blogosphere as it causes people to potentially waste our time when a question is already answered. You should also check and respond to posts and let posters know if they are heading in the write direction or not." Hui's dixit, SIC. And I agree 101%.


If you'd have read the first three green sticky posts at this forums main page...

http://chandoo.org/forums/topic/phd-forum-posting-rules-etiquette-pls-read-before-posting

...you should have noticed this points:


"Never title your posts as "Urgent", "Priority" "Immediate". It may be Important to you, but not for rest of the members here. These words will be moderated out."


"Consider that the world is operating 24hrs a day. A late post today may well be answered by someone else overnight."


"Cross Posting, generally it is considered poor practice to cross post, that is to post the same question on several forums in the hope of getting a response quicker."


"If you do cross post, please put that in your post."


"Also if you have cross posted and get an answer elsewhere, have the courtesy of posting the answer here so other readers can learn from the answer also, as well as stopping people wasting there time on your answered question."


"If you and a reader have been involved in an ongoing conversation and the conversation suddenly stops, recognize that the person may have gone to bed, even though you have just arrived at work. In the worst case a reader may go on holidays and not get back to the question for a few days."


"Say "Thanks", whenever you can. Recognize when someone has bothered to go to the trouble and time to assist you with your question. Often readers will spend several hours working on a solution to a problem, a line of recognition will go a long way."


Regards!
 
Hir SirJB7,


This is a different vba code that i am working than my previous one, so I thought it will be good practice to start a new thread.


I have also checked the Chandoo forumn that you mentioned above. It's slightly different and I was hoping to get some help.


Thanks for replying and clarfying the rules.
 
Back
Top