Micro Focus QTP (UFT) Forums
VB script Code. - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: VB script Code. (/Thread-VB-script-Code)



VB script Code. - Tejas Tikhe - 06-19-2012

Hi
Can anyone please help me in writing the vbscript code for following output.

user will enter some no., according to that following should print.

for Eg:

No=5

1
12
123
1234
12345

above should be the output.

Thanks.


RE: VB script Code. - tanyamrz - 06-19-2012

Hi
Please find the below code


Code:
n = inputbox("Enter a number","Printing the output")
For i=1 to n
x = x&i
print x
Next

Thanks
Tanya


RE: VB script Code. - Tejas Tikhe - 06-19-2012

Thanks Tanya,
Good one.. Cheers!