Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by gprempeh
at 2024-07-17 01:05:27
Point:500 Replies:2 POST_ID:828999USER_ID:10
Topic:
Microsoft Excel Spreadsheet Software;;Microsoft PowerPoint Presentation Software
i have a number of charts on a worksheet, i want to create a macro that copies each of the charts into a separate slide in powerpoint. Thank you!
Accepted Solution
Expert: JSRWilson replied at 2024-07-17 02:31:34
500 points EXCELLENT
This would be the basic code (Late bound) You may need to improve it to suit your needs.
If the charts are not directly on the sheets but have been moved to chart sheets the code would be different.
If the charts are not directly on the sheets but have been moved to chart sheets the code would be different.
Sub pptpaster()Const ppLayoutTitleOnly = 11Dim i As Integer'does not require reference to PowerPointDim pptapp As ObjectDim pptPres As ObjectDim pptsld As ObjectDim s As IntegerDim ocht As ObjectSet pptapp = CreateObject("PowerPoint.Application")pptapp.Visible = TrueSet pptPres = pptapp.Presentations.AddFor s = 1 To ActiveWorkbook.Sheets.CountFor i = 1 To Sheets(s).ChartObjects.CountSheets(s).ChartObjects(i).CopySet pptsld = pptPres.Slides.Add(pptPres.Slides.Count + 1, ppLayoutTitleOnly)Set ocht = pptsld.Shapes.Paste(1)ocht.Left = 100ocht.Top = 200NextNextEnd Sub 1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:22:
Expert: duncanb7 replied at 2024-07-17 01:12:28
There is example tutorial to let you to paste the active excel chart into the Active PowerPoint Slide at
http://peltiertech.com/Excel/XL_PPT.html
Hope understand your question completely.If not , please pt it out
Duncan
http://peltiertech.com/Excel/XL_PPT.html
Hope understand your question completely.If not , please pt it out
Duncan