Excel/automation Gurus., please help... extract macros from excel and adding new macros into an exce

  • Thread starter Thread starter OhMyGaw
  • Start date Start date
O

OhMyGaw

Hello Excel/automation Gurus,

I am working on an application where I have to keep a centralized
database of all macros distributed to user and save the changes back on
a nightly basis back to one central Excel macro repository.

What would you guys suggest me do?

Should I keep all macros in a centralized unique text file of some sort
or is it best to do with SQL server?

Does C# offer any features like extracting macros from excel and adding
new macros into an already existing excel sheet.

BTW, I'm using C#/Windows Forms/SQL Server 2000

I can use all the help I can get...

Thanks,

OhMyGaw!
 
Robbe,

Thanks for the reply. I've tried that link and it works beautiful.

Now, how can I extract the already existing macros from an excel
workbook?

Thanks,

OhMyGaw
 
I've never needed to do that. I suggest looking at the intellisense
in the sample I provided and look at the module object
created here:

module =
wb.VBProject.VBComponents.Add(VBIDE.vbext_ComponentType.vbext_ct_StdModule);

take a look at the module.Collection and try iterating through it and see
what

you get.


--
Robbe Morris - 2004/2005 Microsoft MVP C#

Earn money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp
 
Back
Top