To the Top

Is VBScript or VBA Dead/Dying?

No, VBScript or VBA is neither Dead nor Dying. And VBScript is a very stable scripting language.
Is VBScript Still Relevant? Yes, if you are a windows programmer, it is still worth learning VBScript and it is quick to learn! (It is old but that does not mean it is useless and should be abandoned!)

Depending on the Host Environment, the VBScript can run in the following environments: Windows Scripting Host (WSH), Internet Information Server (IIS), .NET (Known as VB.NET), Microsoft Internet Explorer and Microsoft Office products (such as Excel).

VBScript, not to confuse with VB (Visual Basic), is a scripting language. VBScript may seem outdated, and the support for VBScript is discontinued, but it is still being used in many places. Windows administrators may find it easier to learn/write than Powershell scripts.

VBScript is case insensitive so are other VB variants such as Visual Basic, VBA, ASP. The list of Reserved keywords in VBScript can be found HERE .

You can use this Online VBScript Obfuscator to protect your VBScript source code easily.

VBScript supports Object-Oriented programming. You can define classes and create their instances like this:

Class Boy
    Private m_Name
    Private Sub Class_Initialize
       Name = ""
    End Sub
    Public Sub Set_Name(Name)
    	m_Name = Name
    End Sub
    Public Function Get_Name
    	Get_Name = m_Name
    End Function     
End Class

Set Jack = New Boy
WScript.Echo Jack.Get_Name

VBScript in Windows Scripting Host (WSH)

On Windows Platforms, the Windows Scripting Host Environment is still the best place for VBScript, where VBScript is a handy, lightweight, powerful programming language/scripting language for daily administrative tasks.

VBScript with the CreateObject, is able to call unmanaged COM so that it is still a powerful tool (like a hammer) for many many tasks. It is still going to be shipped by the future OS in the forseeable future for many many years.

Perfect Couple: VBScript and COM

COM is an old Microsoft Technology. It has been invented since 1993. VBScript has been greatly enhanced by the capability to use COM. For example, the Microsoft Office and tons of other appliations are built on COM technology. You can create COM object easily and use the exported function APIs e.g.
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True                        
Set ws = objExcel.Workbooks.Open("Some Excel File.xls")

COM is old technology but it is not dead/dying, nor is VBScript. Could you see how easy to create/use the COM object in the above Excel example? The system administrators do not require IDEs or compile the source code. They just need to open notepad.exe (or other text editors), type in a few lines of VBScript, save it as *.vbs, and double click to run the VBScript under Windows Scripting Host environment. It works just like a charm!


The VBScript version is 5.6 on Windows XP, 5.7 on Windows 7 and 5.8 (latest) on Windows 10. You can use the following VBScript code to show its version.
MsgBox ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion


VBScript is available on Every Windows Versions since Windows 98 (for Win 95, you need to install mannually Windows Scripting Host). This is great as it comes with the OS (you don't need to download and install the compiler or IDE). You can just open notepad, type in VBScript code, save it as *.vbs file extension. Double click the VBScript file and the VBScript code will be interpreted. For example, open a notepad and type the following, which will compute the sum from 1 to 100 using a single for loop.
Dim S
S = 0
For i = 1 to 100
    S = S + i
Msgbox "Sum from 1 to 100 = " & S

HTML Application

The HTA (HTML Application) is an easy way to write desktop/client software/application using HTML, where you can include VBScript or JScript. Bascially, most HTML files can be renamed as *.hta and you'll be able to launch them as a stand-alone desktop application using the Microsoft HTML Application Host.

HTA Examples

VBScript Demos/Examples

Recommended VBScript Tools

Other Posts of VBScript

VBScript Developer's Resources Download

VBScript in Server Side as ASP

VBScript can be used in Server Side (IIS) scripting language e.g. most likely the scripting language used is VBScript in the URL that ends with *.asp. However, the websites that are developed using ASP (Active Server Page) are considered outdated and can generally be replaced by a much modern language or technology such as .NET, PHP or Java.

VBScript as in VB.NET

VB.NET is a programming language targeted for Microsoft .NET platforms. However, VB.NET as limited by syntax, is not as powerful as C#. Therefore, unless you are a beginner, it is not recommended you choose VB as your .NET programming language because C# simply does a better job.

VBA in Microsoft Office

The VBA stands for Visual Basic for Application, which is mainly used in Microsoft Office products. VBA can be quite powerful in creating customized formulas or Macros. For example,
Dim Data(1 to 500) as String
'Copy all values in Data to worksheet range therange.
Range("therange").Value = Application.WorksheetFunction.Transpose(Data)

Relevant VBA Posts

VBScript in Internet Explorer

In Microsoft IE Browsers, you can use VBScript (considering following example). However, you are NOT recommended to use VBScript for browser client scripting, since it is only supported in IE and the Javascript dominates all the browsers.
<script language="VBScript">
  Msgbox "Only in IE!"

Contact Me

via Web Email.

Donation helps

Donation helps the cost of the domain/server, and is very much appreciated.

Why Donate?

Check This page for a few reasons. :)

Page Edited on Irregular Basis: 12/Nov/2017 10:32:39
View in AMP (Accelerated Mobile Pages) Version