VBScript Introduction – tutorial 1

This video introduces the topic. Click the Cc button to see subtitles in English. See tutorial 2 at https://youtu.be/Wd344ElH_Yg

Follow me on:
Website: http://inderpsingh.blogspot.com/
Google+: https://plus.google.com/+InderPSingh
Twitter: https://twitter.com/inder_p_singh

Comments

Cosma Silviu says:

Very good tutorial. Your explanation is good and clear.

mave grupko says:

great video..

question: why you need to use & vbCrLf?
what if we don’t put that in script

Naveen Kumar says:

Thank you sir, Now i understand what is the use of option explicit . For remaining your sessions where i get it

Zee Gill says:

Can you use windows vbscript for testing tool called QTP?

Mangesh Chavan says:

Hello,

I would like to login with Putty in multiple devices (cisco devices) and run some command. I tried to google some code but did not find any good option. Problem is that sendkey does not work with Putty tool

my task is as follow.

1. login to device using putty.
2.enter username
3.enter password
3.run my commands

Cecil4029 says:

This tutorial has been very helpful. Thanks!

Jake H says:

Great video! I’ve been struggling through a scripting book trying to pick this stuff up, but you made this easy to follow along with. Thanks!

TheLonleySheep says:

what does the “Dim” function do?

Aishwarya Das says:

This has helped a lot . Thank you sir !

Aakash Kumar says:

This is very nicely explained. You are a very good teacher sir. Very helpful videos. Thank You!

Rashmi Kiran says:

Nicely explained

JamesIsMyName says:

I absolutely love this first tutorial, except I actually edited a few things to improve upon this simple code…

Option Explicit
Dim firstNumber
firstNumber = InputBox(“Please enter a number to add:”,”First Number”)
if firstNumber = Empty Then
MsgBox “Invalid Input”
WScript.Quit
End if

firstNumber = Cint(firstNumber)
Dim secondNumber
secondNumber = InputBox(“Please eneter a number to add:” & vbCrLf & “To the previous input…”,”Second Number”,0)
Dim sum
Sum = firstNumber + secondNumber
MsgBox “Your Sum is ” & sum

I added an If-Then statement so if you input an empty character for “First Number” you received an invalid input MsgBox instead of just a runtime error.

Thanks!

inna1771 says:

finally tutorial i can understand, thanks, keep on pls

Sumit Watas Official says:

Awesome Sir!!!! i am amazed by watching only part 1…no one explained me how we define a variable which u did simply!!! thanks

Michael Cabrera says:

My job requires programming in Classic ASP.  I am still learning Classic ASP, and this video series about VBScript will help me tremendously. Thank you for taking the time to produce these VBScript videos.  I look forward to viewing more.

ON THE SCREEN says:

Your Explanation is very very clear

nikhil menghani says:

Awesome Explanation…Thank you sir

Dharanesha E says:

good

int tester says:

Can you pls help me….I have saved the file as sum.vbs.and when iam trying to execute by double clicking on that…it is launching the Internet Explorer browser….Iam not able to view the output…wht could be the solution for this…?

nunixnunix04 says:

Very good video and easy to understand. I think I’m starting now to understand better why to use Dim

Maharshi Teja says:

very good explanation. Easily understandable thank you so much

Amjad Mirza says:

Clear and precise explanation. Thank you.

Atcan2013 says:

lol=msgbox (“Very well explained. ” & vbCrLf & “We need more teachers like you :-)” , 20, “Thank you”)

Yon Ploj says:

when im searching for online tutorials on programming i am always worried, because if it’s too boring i lose the will to continue. This happened to me when trying to learn Ruby. I am soooo happy i found this video series it is amazing, THANK YOU FOR AMAZING AND AWESOME TUTORIALS!! 🙂

Ashutosh Tiwari says:

Processing box should be a non-rectangular parallelogram

insecto says:

why is everyone indian in the comment section

MD. SHAFIQUL ISLAM says:

when i open my pc then show a notification microsoft VBScript runtime error..
how can i solve this problem . plz help….

sharath kumar says:

This is one of the best video series to learn VB Scripting. Presentations and explanations are very good.

My Imamdeen says:

nice

Amar Quality says:

By far the best Video series to learn VBScript.

Nitin Sirohi says:

Nice Explanation Sir, the way u have explained the things here are soo easy to understand. I’ve watched ur vedios for the first time today but nw i’ll be a regular follower of ur videos plz continue ur grt work..I really appreciate ur Teachings ! Best Wishes ! 

sushma suresh says:

awesome tutorials….i used to watch all ur tutorials they are very useful..very clean explanation…thank you

Peddzn says:

Thanks for teaching me this! It is very handy for making your own programs.. I watched all of your videos on vbscript and I made my own calculator that can execute all basic operations!!
Option Explicit
On Error Resume Next
Dim Operation,num1,num2
Operation = InputBox(“What operation would you like to execute?”,”Operation”)
num1 = InputBox(“Enter the first number”,”First Number”)
num1 = CInt(num1)
num2 = InputBox(“Enter the second number”,”Second Number”)
num2 = CInt(num2)
‘If block starts
If Operation = LCase(“Addition”) Then
Call Add
Elseif Operation = LCase(“Subtraction”) Then
Call Subtract
Elseif Operation = LCase(“Multiplication”) Then
Call Multiply
Elseif Operation = LCase(“Division”) Then
Call Divide
End If
‘If block ends

‘Sum
Dim sum,difference,product,quotient
Sub Add
sum = num1 + num2
X=MsgBox(“The sum of ” & num1 & ” and ” & num2 & ” is ” & sum & “.”,vbOK,”Sum”)
End Sub
‘Difference
Sub Subtract
difference = num1 – num2
X=MsgBox(“The difference of ” & num1 & ” and ” & num2 & ” is ” & difference & “.”,vbOK,”Difference”)
End Sub
‘Product
Sub Multiply
product = num1 * num2
X=MsgBox(“The product of ” & num1 & ” and ” & num2 & ” is ” & product & “.”,vbOK,”Product”)
End Sub
‘Quotient
Sub Divide
quotient = num1 / num2
X=MsgBox(“The quotient of ” & num1 & ” and ” & num2 & ” is ” & quotient & “.”,vbOK,”Quotient”)
End Sub

Vern's Algorithm says:

Thank you for these videos. Gotta start preparing for my software testing internship in 4 months xD

dixit ... says:

thank u sir, for explaining so well the option explicit concept.i have learnt something new.

ebby nader says:

can you show how to set up notepad++ to run vbs .How to execute the files.

swetha Mutukulla says:

sir your explanation is good and clear

Pringles 00765 says:

Option Explicit
Dim firstNumber
firstNumber = InputBox(“Gib die erste Zahl ein:”,”Erste Nummer”)
firstNumber = Cint(firstNumber)
Dim secondNumber
secondNumber = Cint(InputBox(“Gib die zweite Zahl ein”& vbCrLf &”die zur Summe addiert werden soll”,”Zweite Zahl”,0))
Dim sum
sum = FirstNumber + SecondNumber
Dim Stimme
set Stimme=Createobject(“sapi.spvoice”)
Stimme.speak (firstNumber & “+” & secondNumber & “=” & sum)
MsgBox “Die Summe ist ” & sum

Speaking Calculator 😀

devanand chandel says:

hindi me chiye sir

R-Shift says:

So… reserve or “dim” the variable… and the variable is the sum… so… Dim Sum?

Mohammed Faheem says:

Very clear and smooth explanation. Thanks Sir

anchal therkar says:

very helpful.. thanku sir

Aakash Kumar says:

I have one question to ask. we are using firstNumber and secondNumber on line 5 and 8 respectively but at line no.11 we are
adding the Sum= FirstNumber + SecondNumber. So, does that mean VBscript do not care for small or capital letters??

Subtle Knife Thief says:

This is the best VB Scripting tutorial for beginners.  Thank you!

Karthick Raj says:

Hi,
Can you please tell me how can i generate XML file using VBscript.
I need to take the values dynamically

Ben Chan says:

awesome

 Write a comment

*

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!