| |
GeekInterview.com > Tech FAQs > QTP
| Print | |
Question: Hi i am new to VB Scripting, I have a problem to declare an array in QTP. I am using a variable to declare an array which is come in runtime.
Example:
Dim variable1 - declare the variable using dim variable1 = "senthil" - assign the value which is come in run time Dim variable1 (10) - declare the dynamic array using dim variable1 (1) = "kumar" - store the value in array variable1 (2) = "chandru" - store the value in array
This is the way i tried, but it show the error message like "Name redefined", Is there any possible options available for this, plz send me.
|
| August 08, 2006 04:25:29 |
#5 |
| Sri |
Member Since: Visitor Total Comments: N/A |
RE: Hi i am new to VB Scripting, I have a problem to d... |
Array is access by script value. this value always represent an integer. in ur case try this : VarName = 1 ArrName(VarName)="Senthil" u can also use FOR loop to pass more than one value in an Array. |
| |
Back To Question | |