Remote Procedure Calls

G

Gregory Kip

Hello,

Is there any relatively straightforward way to implement an RPC mechanism
so that, for example, a procedure in MS Project can trigger a procedure in
MS Excel? Is there a data passing mechanism as well?

-Greg
 
C

Chip Pearson

I don't know PowerPoint, but you could set a reference to Excel
and use Run to run the macro. In PowerPoint VBA, go to the Tools
menu, choose References, and select Microsoft Excel Object
Library. Then use code like

Dim XL As Excel.Application
On Error Resume Next
Set XL = GetObject(, "Excel.Application")
If XL Is Nothing Then
Set XL = CreateObject("Excel.Application")
End If

XL.Workbooks.Open "H:\Book2.xls" '<<< CHANGE
XL.Run "MyMacro"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top