Re: VBA, VB Script and VB

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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



"Jon Peltier" <jonxlmvpNO@xxxxxxxxxxxxxxxxxxx> wrote in message
news:OCGXh%23rVIHA.4696@xxxxxxxxxxxxxxxxxxxxxxx
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
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"clara" <clara@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DE7D04E2-21C5-41CD-9BD7-714BD92F44A8@xxxxxxxxxxxxxxxx
Hi all,

What is the difference amnong them

Clara
--
thank you so much for your help




.



Relevant Pages

  • Re: VBA, VB Script and VB
    ... Peltier Technical Services, Inc. - http://PeltierTech.com ... particularly when you write a standalone script ... VBS code can be placed between script tags in an html file for a scenario ... and it's the version that VBA is based on. ...
    (microsoft.public.excel.programming)
  • Re: Questions about GetRef() and ASP, etc.
    ... > stack does NOT extend into a called procedure's scope. ... > script requires catch-all error handling, however, it is often best to set ... > unexposed functions, mix VBS and JS, etc. WSCs are fairly well documented ... > The Err object appears to be misdocumented in the MS VBS documentation. ...
    (microsoft.public.scripting.vbscript)
  • Re: Need Help Converting VBA to VBS
    ... Sub Shutdown() ... VBA and VBS. ... unfortunately running the script directly doesnt ...
    (microsoft.public.scripting.vbscript)
  • Re: Help with values for Error Trapping
    ... The point of a script like VBS is to use many different ... The Err object is an intrinsic global object available under all hosts. ... is error-trapping status in effect at any level in the stack. ...
    (microsoft.public.scripting.vbscript)
  • Re: Help with values for Error Trapping
    ... The point of a script like VBS is to use many different ... >The Err object is an intrinsic global object available under all hosts. ... >is error-trapping status in effect at any level in the stack. ...
    (microsoft.public.scripting.vbscript)