Can an Excel macro be converted into a VBdotnet Windows application?

  • Thread starter Thread starter Mirsten Choiple
  • Start date Start date
M

Mirsten Choiple

Can an Excel macro be converted into a VBdotnet Windows
application?

Thanks in advance,

Mirsten Choiple
 
Indirectly yes, providing you're talking about just automating Excel (think
of it as remote controlling Excel). If you want to start from scratch and
simulate a spreadsheet environment without Excel being on the PC itself then
this will prove extremelly difficult.

The macro code itself will have a direct equievlent in VB.NET. That's the
easy part.

What you'll need to do will involve driving Excel (using VB.NET) through
automation. I may be wrong but the fact you are asking this question
suggests you do not have the knowledge (just now) to make this work. With
that in mind you'll need to look for information on automating Excel through
VB & COM. .NET adds something new to the mix but I'll ignore that for the
moment.

Check back at my site in a few days and I'll stick up an article on this as
a few people have asked me the same thing now.


--
Regards,


Bill Lunney
www.billlunney.com
 
Mirsten Choiple said:
Can an Excel macro be converted into a VBdotnet Windows
application?

Thanks in advance,

Mirsten Choiple

The routines - yes

The code modules can be largely just imported but you
should note there are some changes between VBA and
..Net

For example there are no variants in .net and the handling of
arrays is somewhat different.

Importing forms is also possible but you are better off rebuilding them
using the .net tools.

The actual Spreadsheet functionallity still requires Excel
you can build a compiled .net addin to replace the VBA routines.

Keith
 
Back
Top