Google Answers Logo
View Question
 
Q: Difference between VBA and VB.Net ( Answered,   0 Comments )
Question  
Subject: Difference between VBA and VB.Net
Category: Computers > Programming
Asked by: terrapindesign-ga
List Price: $2.50
Posted: 15 Jun 2003 23:35 PDT
Expires: 15 Jul 2003 23:35 PDT
Question ID: 217809
What is the difference between VBA and VB.Net?  I have a copy of
Visual Studio.Net.  Can I do VBA programming with it?
Answer  
Subject: Re: Difference between VBA and VB.Net
Answered By: mathtalk-ga on 16 Jun 2003 10:40 PDT
 
Hi, terrapindesign-ga:

The short answer is that it would be very difficult to do VBA
programming currently within Visual Studio.Net.  Each MS Office
product, however, supplies its own VBA development and debugging
facility (though typically the VBA help file is not installed under
the default options).

Up to now VBA (Visual Basic for Applications) has been an
"interpreted" version of Visual Basic used in Microsoft's Office suite
products, closely related to the Visual Basic "script" that is used in
ASP and Windows Scripting Host.  As such VBA is highly dependent on
the Variant datatype (all variables are variants) and on COM.

VB.Net eliminates the Variant datatype and moves the Visual Basic
"theater" away from COM (however without burning bridges "behind" at
this point).  Microsoft has slated new tools for Excel and Word
automation based on the .Net infrastructure to roll out with Office
2003 in "late summer".  See here for the product announcement:

[Visual Studio .NET and Office Development]
http://msdn.microsoft.com/vstudio/office/

[Visual Studio Tools for Office]
http://msdn.microsoft.com/library/en-us/odc_vsto2003_ta/html/VSTOIntro.asp

One thing that VS.Net could be used for, related to VBA development,
is the creation of OLE automation/ActiveX components using native C++.
 Provided that you build the automation interfaces (which is made
fairly painless by the C++ wizards), these components can then be
called in VBA once the appropriate references are added to the VBA
"project".

Admittedly that would not leverage either the simplicity of the VB
syntax nor the extensive .Net runtime library, so it's a rather silly
suggestion.  It is also possible (but nontrivial) to call .Net
libraries from within compiled VB6 code, but this is even further
afield from what you want to do.

Please post a request for clarification if one is needed.

regards, mathtalk-ga
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy