VB versus VBA

aziz rasul

Active member
Local time
Today, 16:19
Joined
Jun 26, 2000
Messages
1,935
What is the fundamental difference between using VBA and VB.

Does anyone have a simple example of a VB project that they have that I can look at which does not affect your privacy or the company's privacy that you work for. I realise that this is a rather strange request to make. However I hope that it will give me an easy insight to the differences between the two. I can then decide whether I want to pursue the learning curve for learning VB.
 
IMO the biggest difference between VBA and VB is,

VB is a compiled language

VBA is not

making vb far faster and more stable.
 
Shadez, what exactly happens when VBA (or indeed other languages like C) compiles code?
 
1. Compiled code has no need for comments or white space - these are removed;

When you run uncompiled code it is first compiled and then executed meaning that every time you edit a module, your whole application becomes uncompiled and when you run it, it is recompiled

2. The compiler has to convert the VBA language into something understandable to the computer i.e binary

Apparently (i.e I read it somewhere) there are about 12 steps to compile VBA code which you don't need to understand - that's some boffin at Microsoft's job!

3. As the code is compiled it runs faster.


Difference between VBA and VB is that VBA is a subset of VB tailored towards a specific application.
 
I assume that since both use BASIC, the way that the commands are written are the same, i.e. the syntax is the same.
 
Now your asking complicated questions.........


a compiler basicly takes your code and converts it into

0's and 1's

that the computer understands.







More advantages of vb

1) it doesnt crash as much,
2) you have much more flexability if what you can do
 
Yes, it is the same language. VBA, depending on the application, is just a small chunk of VB. It also goes beyond what the Office applications can achieve and has even more controls.
 
Any books you guys can recommend for an beginner to intermediate user?
 
I don't particularly know as I don't know what you are wanting to do with VB.

The book I have: VB & VBA in a Nutshell suffices for me as it is a good listing of all the functions, datatypes, and a detailing of some VB Object models. A handy reference.

If you are looking to start; I'm sorry I don't know.

I personally started way back in the early eighties learning to program with BASIC on my Amstrad and found it easy to switch to VB years later without having to learn or follow examples (unless there was something new specifically to learn.)
 
Aziz, if you are just getting started with VB and want a long future with it. I would recommend that you start with VB.Net now. It is more OOP then was VB 6 and is the direction that MS is heading with all its development tools including those for the new Office (at least that is the rumor I heard).
 
Thanks for advice BukHix. Much appreciated.

Is that the trend in the US?
 
I started using ASP.Net early on when the framework was still in beta and fell in love with it instantly. There is a lot more to know then there was with classic ASP but once you get the hang of things the effort it takes to learn new things pays off instantly.

I just received the VB.Net IDE (US $109) about three days ago and have just started working with it, well actualy playing around with it. It is a great tool and makes VB.Net as easy as Access does databases.

Ok enough of the advertisement and I hope Mr. Gates spells my name right on the endorsement check. Oops I almost forgot the gratuitous plug to the web site Product Information for Visual Basic .NET 2003
 
This just came to me. Can you do all the things that MS Access does by simply using VB only?
 
Yes and more. Although, many use them together. VB (.Net) as the front end and Access as the data store or back end. It is a great way to make stand alone "Access" applications.
 

Users who are viewing this thread

Back
Top Bottom