tags:

views:

187

answers:

1

hi i am working with c# and excel-2007... i wanted to add a macro to excel and run from c#, for which i think i need access to the VBComponents but unfortunately i cannot see it after i do the following

    wb.VBProject.

should i add any com objects? or what should i do to see the VBComponents...

i already have

    using Excel = Microsoft.Office.Interop.Excel;

    //wb is a workbook i can see VBProject but not other components of it...
+1  A: 

To add the VBIDE, looks like you have to search for the Microsoft Visual Basic for Applications Extensibility Library. See here for more details.

Hope these help.

Dervin Thunk
i already have using Excel = Microsoft.Office.Interop.Excel;
i am using that site and cannot get VBComponents...
i am using example from this sitehttp://www.eggheadcafe.com/articles/create_macro_at_runtime_in_dotnet.aspwhere he gets VBComponents from VBProject, but i cannot see VBComponents afte wb.VBProject. (i see nothing)my question is how can i get VBComponents
how about this? http://support.microsoft.com/kb/303872
Dervin Thunk
just updated my answer. did you get it to work?
Dervin Thunk
THANKS a lot!!!
Glad I could help.
Dervin Thunk