Using VBScript with Internet Explorer 11

This section provides tutorial example on how to enable script running and disable 'Edge' mode in IE 11 to load Web pages embedded with VBScript code.

VBScript support in IE (Internet Explorer) 11 is turned off by default. If you want to run VBScript code in IE 11, you need to change two settings.

1. Enable scripts and ActiveX controls - When IE 11 is not enabled to run scripts and ActiveX controls, it will prompt you with the following message box:

Internet Explorer restricted this webpage from
running scripts or ActiveX controls.
                      [ Allow blocked content ]

Click "Allow blocked content" to allow IE 11 to run VBScript code embedded in the Web page.

Enable Script Running in IE 11
Enable Script Running in IE 11

2. Disable "Edge" mode - By default, IE 11 is running in "Edge" mode, which does not support VBScript. So you need to disable the "Edge" mode:

Press F12 to open the IE Developer Tools pane.

Click "Emulation" tab.

Change the "Document mode" setting from "Edge" to "10".

Click the "Persist Emulation Settings" icon at the top left corner to save the change.

Disable Edge Mode in IE 11
Disable Edge Mode in IE 11

After those two changes, you should be able to run VBScript code in IE 11.

Table of Contents

 About This Book

Introduction of VBScript - Visual Basic Scripting Edition

 What Is VBScript?

 Using VBScript with Internet Explorer 10 or Older

Using VBScript with Internet Explorer 11

 Using VBScript with Internet Information Services

 Using VBScript with WSH (Windows Script Host)

 Using Visual Basic with Microsoft Access

 VBScript and Supporting Environments

 Variant Data Type, Subtypes, and Literals

 Arithmetic Operations

 Numeric Comparison Operations and Logical Operations

 String Operations - Concatenation and Comparison

 Variable Declaration and Assignment Statement

 Expression and Order of Operation Precedence

 Statement Syntax and Statement Types

 Array Data Type and Related Statements

 Array References and Array Assignment Statements

 Conditional Statements - "If ... Then" and "Select Case"

 Loop Statements - "For", "While", and "Do"

 "Function" and "Sub" Procedures

 Built-in Functions

 Inspecting Variables Received in Procedures

 Error Handling Flag and the "Err" Object

 Regular Expression Pattern Match and Replacement

 scrrun.dll - Scripting Runtime DLL Library

 Creating Your Own Classes

 IE Web Browser Supporting VBScript

 IIS ASP Server Supporting VBScript

 WSH (Windows Script Host)

 References

 Full Version in PDF/EPUB