how to write basic programs in VB Script like addition,
multiplication?

Answer Posted / chandan

'script for adding two numbers
option explicit
dim num1,num2,result
num1=200
num2=300
result=num1+num2
msgbox result

Is This Answer Correct ?    11 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?

523


What's the difference between vbscript and vb.net?

550


What are the environments supported by vbscript language?

504


What is byref and byval parameters in vbscript?

604


What is select case statement?

600






What is the purpose of folders object of scripting.filesystemobject class in vbscript?

865


I need to get some data from data base and store this (retrieved) data in a excel sheet using VB script in QTP9.0 I have created connection for data base I have created as excels sheet by using Set XL=CreateObject("Excel.Application") XLworksheet.cells(1,1).value= rs.fields.item("<>") I have taken a for loop and changed the cells values (1 as i and another 1 as j) But still I am not able to get Plz kindly tell me know this . It is very urgent

1769


can anyone tell me the procedure of interview held in applabs

1749


How will you convert a given number to long in vbscript?

490


Explain the operator precedence in vb script?

650


How can you create a file object to work with the files in the vbscript language?

505


If else for do while select in vb script?

640


1.I want to establish connection with excel and also want to fetch the data using SQL queries. 2.the code should be written in such a way that in future if I want to migrate from excel to MS excess database , then there should be minimal changes.

1514


What is the use of option explicit statement?

583


What is the scope of a constant declared using public?

557