how to write basic programs in VB Script like addition,
multiplication?
Answers were Sorted based on User's Feedback
Answer / vaibhav
function vaibhav x,y
dim x,
dim y,
dim z,
z=x*y
msgbox z
Is This Answer Correct ? | 116 Yes | 59 No |
Answer / dev
1.addition
DIM A=10
DIM B=20
DIM C
DIM D
C=A+B
MSGBOX C (here output is 1020)
C=INT A+INT B
MSGBOX C (HERE OUTPUT IS 30)
D=A*B
MSGBOX D (OUTPUT IS 200)
Is This Answer Correct ? | 84 Yes | 54 No |
Answer / chandra
'addition
DIM A
A=INPUTBOX("enter a val")
DIM B
B=INPUTBOX("enter b val")
DIM C
DIM D
C=A+B
MSGBOX C (here output is 1020)
C=INT (A)+INT (B)
MSGBOX C '(HERE OUTPUT IS 30)
D=A*B
MSGBOX D '(OUTPUT IS 200)
Is This Answer Correct ? | 50 Yes | 29 No |
Answer / rohit yadav
private sub command 1_click()
text3.text=val(text1.text)+val(text2.text)
end sub
Is This Answer Correct ? | 26 Yes | 10 No |
Answer / ramesh
dim a,b,c,d
a=inputbox ("enter the value a: ")
b=inputbox ("enter the value b: ")
c=cint(a)+ cint (b)
d=a*b
msgbox c
msgbox d
Is This Answer Correct ? | 13 Yes | 3 No |
Answer / 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 |
Answer / venkat
Dim a
Dim b
a=inputbox("enter a value")
b=inputbox("enter b value")
Dim c
c=int(a)+int(b)
Msgbox c
Is This Answer Correct ? | 6 Yes | 3 No |
Answer / vani
dim a,b,sum,mul
a=cdbl(inputbox("enter a?"))
b=cdbl(inputbox("enter b?"))
sum=a+b
mul=a*b
msgbox sum
msgbox mul
Is This Answer Correct ? | 5 Yes | 4 No |
Answer / pravati
Call sum(x,y)
Function sum(x,y)
x=cint(inputbox ("enter a no"))
y=cint(inputbox ("enter a no"))
z=inputbox("enter the value")
Select Case z
Case "+" msgbox x+y
Case "-" msgbox x-y
End Select
End Function
Is This Answer Correct ? | 1 Yes | 1 No |
Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.
How regexp.execute method works?
give me any information abou vb script books learn quckly
i have developed the below QTP script to count the no of items available in the web list "Select a product" in www.bankrate.com and also want to print what are the items??? can any one help me to rectify the below script??? SystemUtil.Run "iexplore.exe","www.bankrate.com" a=Browser("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").page("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").Weblist("name:=select").GetTOProperty("items count") msgbox a Dim List() ReDim List(a-1) For i = 1 To a List(i-1)=Browser("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").page ("title:=Mortgage Rates Credit Cards Refinance Home CD Rates by Bankrate.com").Weblist("name:=select").GetItem(i) Print List(i-1) Next
after medical test,when will be the police verification
Both Static and dynamic arrays are handled by VB script. Is it true?
Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji
Mention what is the main difference between function and sub-procedure?
Hi I don't have any idea on VBscript. can any one point me to a good web site to learn VBscript. Regards lina
best training centre in bangalore
What is vbscript?
how to find greatest of n numbers!