Question

Locked

How to run an excel macro in powerpoint

By pc_redes ·
Hi there,

I have a presentation in power point with a chart on it. In office 2007 the charts are linked to excel, so if you change the data in the excel cells you will see the changes on your chart right away.
My question is: How do you run a macro from power point that change that cells?
The current macro I'm running from excel is:
mycount = Range("b2") + 100
Range("b2") = mycount

but I will like to run it from power point and I don't know how to link power point to excel.

Any advice??
Thanks in advance!!!

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Run an excel macro from within PowerPoint

by jyellis In reply to How to run an excel macro ...

Sub ImportData()
Dim XL As Object
Dim thisPath As String

thisPath = ActivePresentation.Path

Set XL = CreateObject("Excel.Application")

XL.Workbooks.Open thisPath & "\ABC Derailment.xls"

' If there is more than one macro called LoopShts,
' the module name would be required as in
'
' XL.Run "Module1.LoopShts"
'
' to differentiate which routine is being called.
'
XL.Run "LoopShts"

End Sub

Back to Software Forum
2 total posts (Page 1 of 1)  

Software Forums