VBA vs VB vs VBA.Net

G

Guest

I am contemplating migrating my VBA Add-in (for Excel) into a more secure
product. I was assuming that I could try to migrate this over to VB 6.0 and
create a COM add-in. I also have been wondering whether or not I can creat
add-ins in VB.Net. I have come to realise that I am confused by some of the
terminology I see and need clarification.

1) Is "VBA" - as used in Office products (Excel/Word etc) simply "VB 6.0"?
2) Is "VB Script" simply VBA code as used in VBA in Office?
3) If I purchase "Visual Basic 2005 (Express Edition)" what does this
include: VB 6.0, VB.Net, both? I ask this as when you look at the products
that are included in Visual Basic Studio, you do not see reference to .Net.
You see Visual Basic, C++ etc but I am not sure if this is based on the .Net
framework. And if it is, does this mean that I cannot create regular VB
programs?

Thanks

EM
 
T

Tom Ogilvy

As I understand it, VB 6.0 uses VBA as its engine and adds functionality to
it the same as Excel does. so VB6 is a superset of VBA although most look
at VBA as a subset of VB6.

Anything after around 2002 that has to do with VB and microsoft refers to
the .NET technology. so VB 2005 (express) is VB.Net

People use VB Script in a lot of different ways. In terms of Excel, it is
probably referring to VBA. There are also several scripting languages based
on subsets of VBA/VB6.
 
G

Guest

So Tom is it correct to say that if I want to migrate my VBA Add-in into a
Com Add-in then I would do so via VB 6.0? And if so, I should buy VB 6.0 and
NOT Visual Basic 2005 as this is really VB.Net.

Thanks

EM
 
T

Tom Ogilvy

Yes.

--
Regards,
Tom Ogilvy


ExcelMonkey said:
So Tom is it correct to say that if I want to migrate my VBA Add-in into a
Com Add-in then I would do so via VB 6.0? And if so, I should buy VB 6.0 and
NOT Visual Basic 2005 as this is really VB.Net.

Thanks

EM
 
R

RB Smissaert

Unless you want your add-in to be available to other Office applications,
such as Word, it will be much easier to move code from your .xla add-in to a
VB6 ActiveX dll rather than making a COM add-in in either VB6 or VB Net.
VB Net is a whole different language and a COM add-in is quite a bit
different than a .xla add-in. Moving code from an .xla file to a VB6 ActiveX
dll is extremely easy.

RBS
 
G

Guest

Migrate your VBA code base to VB.Net and write a PIA wrapper so it can be
connected to Excel.

Don't waste time porting VBA->VB6, VB6 is nearing end-of-life and will not
be supported for that much longer.

The COM addin is a fabulous technology that never seemed to get the
attention that it deserved. Have a look at the following MSDN articles:

http://msdn.microsoft.com/office/un...a/html/officevstolanguagemigrationfromvba.asp

http://msdn.microsoft.com/library/d...ry/en-us/dno2kta/html/msotrcom.asp?frame=true

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dno2kta/html/trcomad.asp?frame=true

Have a look at those and then if you have any questions just ask...
 
T

Tom Ogilvy

Note that the two articles (second two) on COM addins are using VBA 6 and
the first article is about converting VBA to VB.NET.
 
G

Guest

Is it correct to say VBA macros written using Excel 2000 will likely not run
properly with Excel 2003 without making the necessary conversions?

I think the article you referenced was pretty clear about Office 2003 using
Visual Studio, but I want to double check and make sure before I tell my boss
we'll have to change many of our templates when (if) the office updates their
computers and are all working w/Office 2003.
 
N

NickHK

JMB,
MS indicate that VBA will remain the language for the Office IDE for the
foreseeable future, so a few more years, I guess.
So 2000 code runs on 2003 and probably up to 2008??

NickHK
 
G

Guest

Thanks Nick. I've had some trouble trying to figure out how/if this affected
some of our excel templates.
 
T

Tom Ogilvy

There is probably 100% compatibility going forward from xl2000 to xl2003.
Both Excels use the same major version of VBA (vba 6).

The article on VB.net was talking about the 2003 version of Visual Studio.
It can interact with xl2003, but certainly not as transparently as VBA and
is not required at all.
 
G

Guest

Thanks Tom!

Tom Ogilvy said:
There is probably 100% compatibility going forward from xl2000 to xl2003.
Both Excels use the same major version of VBA (vba 6).

The article on VB.net was talking about the 2003 version of Visual Studio.
It can interact with xl2003, but certainly not as transparently as VBA and
is not required at all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top