Remote Procedure Calls

  • Thread starter Thread starter Gregory Kip
  • Start date Start date
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
 
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
 
Back
Top