VBScript Conditional Statements

VBScript Conditional Statements

VBScript Conditional Statements, VBScript Language Fundamentals, VBScript Control Flow, VBScript If Statement, and ‘Select Case’ statement. VBScript Conditional Statements 1. Execute a Statement when the condition is True. Syntax: If Condition Then Statement Example: Dim myDate myDate = #10/10/2010# If myDate < Date Then myDate = Date Msgbox myDate myDate = #10/10/2017# If myDate < … Read more

VBScript Variables

VBScript Variables

VBScript Variables, Implicit Declaration of Data Types, What is VBScript Variable?, Assign Values to Variables, and Declare & Use Variables. VBScript Variables are variants, they can hold any type of data throughout the program. VBScript supports the implicit and explicit declaration of variables. Variables in VBScript 1. What is a Variable? 2. Declaration of variables … Read more

Introduction to VBScript

Introduction to VBScript

Introduction to VBScript, What is VBScript?, Scripting Languages vs. Programming Languages, and VBScript Programming Fundamentals. Introduction to VBScript 1. What is VBScript? 2. Scripting Languages versus Programming Languages 3. Usage of VBScript 4. VBScript Fundamentals and Features 1. What is VBScript? Visual Basic Script (VBScript) is a component-based scripting language developed by Microsoft. It is … Read more

VBScript FileSystemObject Part-2

VBScript FileSystemObject Part-2 1) Write data Continuously in a Text file. Dim objFso, objTextstream, num1, num2, Res num1=10 : num2 =20: Res=num1 + num2 Res2=num1*num2 Set objFso = CreateObject(“Scripting.FileSystemObject”) Set objTextstream = objFso.OpenTextFile(“C:\Users\G C REDDY\Desktop\abc.txt”, 2) objTextstream.Write “Addition of num1, num2 is: “&Res objTextstream.Write “Multiplication of num1, num2 is: “&Res2 objTextstream.Close Set objTextstream = Nothing … Read more

VBScript Database Objects

  VBScript Database Objects 1) Database Connection Object It is used to connect to Databases. (* Database Connection String only varies from One Database to another) Create Database Connection Object Set variable = CreateObject(“Adodb.Connection”) 2) Database Recordset Object It is used to perform operations on Database tables (records) Create Database Recordset Object Set variable = … Read more

VBScript Built in Functions

VBScript Built in Functions 1) Asc Function It returns ANSI character code for first letter of a string or number. ‘A to z (65 to 90) ‘a to z (97 to 122) ‘0 to 9 (48 to 57) Example: Dim a a =”ABCD” Msgbox Asc(a) ’65 Msgbox Asc(“A”) ’65 Msgbox Asc(“Z”) ’90 Msgbox Asc(“a”) ’97 … Read more

VBScript Tutorial 8

VBScript Tutorial 8 (Excel Object Model in VBScript) Excel Application operations using Excel Application Object Excel Application Object: It is used to perform operations on Excel Application. Create Excel Application Object: Set Variable = CreateObject(“Excel.Application”) ———————- Excel Application Excel Workbook / File Excel Worksheet / Sheet Excel File Operations using VBScript Examples: 1) Create an … Read more

UFT Class 21

UFT Class 21 (VBScript Fundamentals and Features) 1) Comments To make the code readable To make the code disable from execution 2) Data Types VBScript supports implicit declaration of Data Types. In VBScript, only data type is Variant. Using VarType function we can check data sub-type Ex: Dim a a =”abcd” a = 123 a … Read more