PDA

View Full Version : What is the difference between VBA and Visual Basic.Net ??



Mel_3
02-23-2011, 01:38 PM
I know that VBA comes with MS Access
while Visual Basic.net is a separate product.

1 - But is VBA and Visual Basic.net the same?

2 - Can you do all (or much of) the same stuff using VBA inside MS Access that you can do with Visual Basic.net?

Thanks for any help.

Frosty
02-23-2011, 09:08 PM
This is one of those questions where the right answer is the wrong answer for you.

They are not the same. However, the differences are not all that important to a non-programmer (which, if you are asking that question, I'm guessing you are not a programmer).

The learning curve to program something for Access from .NET would be considerably higher than programming something from within VBA for Access, assuming the user has a pretty good knowledge of Access.

In addition, Access has an interface which allows you to program "macros" without using VBA, which can come in pretty handy as well.

Mel_3
02-24-2011, 12:28 PM
Thanks Frosty.

FYI I've programmed extensively in assembly language, ASP (Active Server Pages), PHP, HTML, Basic, and others.

Know about Classes, Instances, Objects, Methods, Properties, and other OOP stuff.

I've created a number of MS Access multi-table data bases using the built in tools, macros, and some VBA.

I don't know if... using Access VBA you can work with Microsoft Media Foundation...

Maybe the question is... with VBA can you do/work with/use .Net and COM stuff?

Thanks for any help.

Frosty
02-24-2011, 01:36 PM
I can't answer the Microsoft Media Foundation, specifically. Sorry. And it sounds like you'll have the background to do the research at least as well as I could (and you certainly will have more motivation to do so, *grin*).

But you can definitely set up references in a VBA project to access (no pun intended) outside addins (whether COM or DLLs/OCX you've developed in Visual Studio or some other platform).

It may help you to go into the VBA developer interface in one of the office appliations, and check out Tools > References. Also, in 2007 and later, there is generally a Developer tab on the main application window, which allows you to view (and add) addins and COM add-ins. How you programmatically use those addins would, of course, depend on how they are built, but it's not hard.

Paul_Hossler
02-24-2011, 01:44 PM
Mel_3

Short (less than perfect) answer:

VBA doesn't create stand alone executables (my understanding is that it's interpeted p-code).

VBA only runs as part of another app (or apps) (typically one of the MS Office apps)

VBA (to me) seems to have an 'understanding' of the MS Office app object model

If I'm wrong, I'm sure that the very knowledgable members of the forums will point that out to me :giggle

Paul



VBA

CreganTur
02-24-2011, 02:16 PM
VB .NET is a real, compilable programming language that allows you to leverage the .NET framework. You can create complex programs with it much easier than with VBA and without the overhead of an Office product requried to run the VBA.

VB .NET is what you want to use to build stand alone applications. It is much easier to properly design Object Oriented applications in it than in VBA.

Mel_3
02-25-2011, 01:40 PM
Thanks Guys. Very helpful.

- Actually we want this to run in MS Access... as a stand-alone MS Access Application using the Microsoft Access runtime.

In other words this is all part of a database application.

- It would, to us, make things easier if we could use Media Foundation's features, methods, etc via Access VBA... so from within the database application video's of various formats could be launched and played.

Thanks again for the help.