How can I call VBA function in C#

Posted by Gudevg under C# on 4/18/2012 | Points: 10 | Views : 1746 | Status : [Member] | Replies : 2
Good Morning to all,

I use some vba macro in my input document, since developing tool for the complete process in c#. How can i call that VBA in c#?

Anybody suggest me to complete this regards.

Deepakkumar G.


Responses

Posted by: Sunny4989 on: 4/18/2012 [Member] Starter | Points: 25

Up
0
Down
Will the function return some value

------------------------------------------------
Learn throughout life

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sunny4989 on: 4/18/2012 [Member] Starter | Points: 25

Up
0
Down
Move your VBA function from Sheet2 code module to Standard Code Module.
(Also change in your code 'Run("Sheet2.ValidateData", ... ' -> 'Run("ValidateData", ... ').
Functions in sheet modules should contain only the event procedures for the object, so they can't return anything.


------------------------------------------------
Learn throughout life

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response