ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can an Excel macro be converted into a VBdotnet Windows application? (https://www.excelbanter.com/excel-programming/272894-can-excel-macro-converted-into-vbdotnet-windows-application.html)

Mirsten Choiple

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

Thanks in advance,

Mirsten Choiple





Bill Lunney

Can an Excel macro be converted into a VBdotnet Windows application?
 
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" wrote in message
...
Can an Excel macro be converted into a VBdotnet Windows
application?

Thanks in advance,

Mirsten Choiple







Keith Willshaw

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

"Mirsten Choiple" wrote in message
...
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




All times are GMT +1. The time now is 07:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com