VBA, VB Script and VB

  • Thread starter Thread starter clara
  • Start date Start date
VB is the big brother. In VB you can create standalone programs. VB6 is the
last version before .Net, and it's the version that VBA is based on.

VBA is a subset of VB, which is used inside an application, such as Excel,
Word, other MS Office products, and also some third party products. VBA
cannot build standalone applications, but it can vastly extend the
capabilities of its parent application.

VBS is a scripting language based on VB but scaled down somewhat. You can
build standalone programs in VBS.

It's possible to use VB or VBS to control a program that uses VBA, and from
VBA you can call libraries created in VB.

- Jon
 
I wouldn't go so far as to say "you can build standalone programs in VBS".
It often appears that way, particularly when you write a standalone script
but that isn't quite what is happening.

A block of VBScript code is a set of text instructions that can operate in
several different scenarios by being 'hosted' by certain applications. VBS
code can be placed between script tags in an html file for a scenario where
the script is handled by the browser (like iexplore.exe on many systems) of
the user's computer. Likewise, the script can be placed inside an hta file
which is almost identical to an html file except the host is mshta.exe and
the security restrictions the user has for Internet Explorer has no impact
on what the script is allowed to do.

If the VBScript is created as a text file with the vbs extension, it behaves
very much like a standalone program. In reality, the script is being hosted
by the Windows Script Host and the process handling the job is one of two
executable files, wscript.exe or cscript.exe. The choice of wscript.exe or
cscript.exe can be made by starting them with a command line using the vbs
file as an argument or by double clicking the vbs file, in which case the
choice of wscript.exe or cscript.exe depends on file association settings in
the registry.


Steve Yandl
 
Back
Top