iLogic run macro in excel

iLogic run macro in excel

Anonymous
Not applicable
1,009 Views
3 Replies
Message 1 of 4

iLogic run macro in excel

Anonymous
Not applicable

Hello friends,

 

Is there a command within iLogic to run an excel macro?

 

I have an embedded excel workbook which gets passed parameter values via an iLogic rule. I'd like it to then run a macro and read the value of a few cells after the macro has finished.

 

See below my rule and the point at which I'd like the macro to run.

 

GoExcel.CellValue("3rd Party:Embedding 1", "Data Input", "B2") = param1
GoExcel.CellValue("B3") = param2
GoExcel.CellValue("B4") = param3

'''''***** RUN MACRO called Front *****''''' posA = GoExcel.CellValue("B20") posB = GoExcel.CellValue("B21") posC = GoExcel.CellValue("B22")

 

0 Likes
1,010 Views
3 Replies
Replies (3)
Message 2 of 4

frederic.vandenplas
Collaborator
Collaborator

This code executes the vba code in excel (under module1, create a sub called "Test")

 

Sub XLTest()

     Dim XL As Object
     Set XL = GetObject(, "Excel.Application")
     XL.Run "Module1.Test"

End Sub
If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"
0 Likes
Message 3 of 4

Anonymous
Not applicable

@frederic.vandenplas

I get the following error with your code:

 

Cannot create ActiveX component.

 

Using Inv Pro 2015

 

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

sorry wrong account

0 Likes