It is an array, U can't call directly, U have to follow array rules '

Msgbox   bReturn (1,1)

User Lbound and Rbound , run in the loop to get all the values

Regards,
Srinivas Mangalarapu


On Mon, Jul 9, 2012 at 9:37 PM, nikhil <[email protected]> wrote:

> Hi Sujit,
>
> Please see the code below:
>
> bReturn=GetTableValue(Rows,**Cols)
>
> Function GetTableValue(iRows,iCols)
> Redim arrReturn(iRows*iCols)
>        Dim iRowCount ,iColCount,**iArrayIndex
>
> iArrayIndex=0
> For iRowCount = 0 to iRows-1
> For iColCount = 0 to iCols-1
>  arrReturn(iArrayIndex) =Browser("MainBrowser").Page("**
> PgName").WebTable("tblName").**GetCellData(iRowCount,**iColCount)
>  iArrayIndex=iArrayIndex+1
> Next
> Next
> GetTableValue=arrReturn
> End Function
>
>
> but QTP says invalid arguments when I'm calling the GetTableValue
> function. I'm passing just rowcount and colcount.
>
> Can u explain what the problem.
>
>
>
> On Wednesday, 20 June 2012 22:53:38 UTC+5:30, sujit wrote:
>>
>> Hi Nikhil
>>
>> see function below
>>
>> Rows=2
>> Cols=7
>> ''all values stored in to Array bReturn
>>
>> bReturn=GetTableValue(Rows,**Cols)
>>
>> Function GetTableValue(iRows,iCols)
>> Redim arrReturn(iRows*iCols)
>>        Dim iRowCount ,iColCount,**iArrayIndex
>>
>> iArrayIndex=0
>> For iRowCount = 0 to iRows-1
>> For iColCount = 0 to iCols-1
>>  arrReturn(iArrayIndex) =Browser("MainBrowser").Page("**
>> PgName").WebTable("tblName").**GetCellData(iRowCount,**iColCount)
>>  iArrayIndex=iArrayIndex+1
>> Next
>> Next
>> GetTableValue=arrReturn
>> End Function
>>
>> feel free to ask if you have any query :)
>>
>> --
>> Thanks  & Regards
>> Sujit :)
>>
>> On Tue, Jun 19, 2012 at 11:59 PM, nikhil <[email protected]> wrote:
>>
>>> Hi I have a webtable with 2 rows and 7 columns. I need all the values.
>>> All these values
>>> need to be stored in an aray as I will be using these values to compare
>>> with others.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> "QTP - HP Quick Test Professional - Automated Software Testing"
>>> group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> MercuryQTP+unsubscribe@**googlegroups.com<mercuryqtp%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/MercuryQTP?hl=en<http://groups.google.com/group/MercuryQTP?hl=en>
>>>
>>
>>
>>
>>  --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to