Calling Excel Macros

  • Thread starter Thread starter TommyBoy
  • Start date Start date
T

TommyBoy

i'm trying to call an excel macro from C#, but i have never done it
before, and advice? can you pass an argument to a macro.. if so how?
Thanks in advance
 
You may generate CCW for excel automation server (type library sits in
excel9.olb) or use PIAs to call ExecuteExcel4Macro() function. But using
PIAs you limit yourself to use only Office XP.
It can't receive parameters but as a variant you can pass them through
hidded cells on worksheet...
 
Check out the Run method of the Excel.Application object.
Try it from another VBA client first.
 
Thanks a lot guys, i have that working now, but now the problem i'm
having is i can call the macro and it runs fine, but if i need to pull
up another excel app, i import the macro and the reference, and you can
pull up that application and see the macro, but in my code it says it
can't find it
 
Back
Top