Re: Redim array?

2011-01-17 Thread Mr. Anand
Just use the redim preserve arrayname. I hope it would work out well. On Jan 11, 10:12 pm, ann hoang annthu2...@yahoo.com wrote: Hi all,   Have anyone ever try to redim array? I try to redim array but it doesn't work. For example: first time, I have dim array size 5 but second time, I try to

Re: Redim array?

2011-01-13 Thread byzoor rahuman
HI, Dim arrValue() strGetRoCount=B().P().F().WebTable().GetRoPropeties(Rows) Redim arrValue(strGetRoCount) strCol=B().P().F().WebTable(Cols) Redim Preserve arrValue(strCol) Happy Tester, Byzoor On Tue, Jan 11, 2011 at 10:42 PM, ann hoang annthu2...@yahoo.com wrote: Hi all, Have anyone ever

Re: Redim array?

2011-01-12 Thread ShivaKumar Bandaru
Hi Ann, Check the below code then you will came to know the usage of ReDim. 'Sample code for Usage of Redim ReDim A(5) A(5)=7 Print A(5) ReDim preserve A(3) Print A(5) Thanks Shiva Bandaru On Tue, Jan 11, 2011 at 10:42 PM, ann hoang annthu2...@yahoo.com wrote: Hi all, Have anyone ever try

Re: Redim array?

2011-01-12 Thread vivek kaliyaperumal
Hi Ann, Property of Redim is Resizing the given array. If u reduce the size of array, you lose the data in the eliminated elements. Ex If Array size is 8 If u reduce the array size to 5 u will lost the data in the eliminated elements(ie data in the a(5),a(6) anda(7) elements will lost).

Re: Redim array?

2011-01-12 Thread Ramya harini
U hav already fixed ur array size to 5 while ur declaring it... use this way. dim myarray() redim myarray(5) redim myarray(3) On Tue, Jan 11, 2011 at 10:42 PM, ann hoang annthu2...@yahoo.com wrote: Hi all, Have anyone ever try to redim array? I try to redim array but it doesn't work. For

Re: Redim array?

2011-01-12 Thread vivek joglekar
This code may work ReDim A(5) A(5)=7 Print A(5) ReDim preserve A(3) Print A(3) On Wed, Jan 12, 2011 at 12:51 PM, Ramya harini ramyahar...@gmail.comwrote: U hav already fixed ur array size to 5 while ur declaring it... use this way. dim myarray() redim myarray(5) redim myarray(3) On

Re: Redim array?

2011-01-12 Thread ann hoang
Thank you very much all for your inputs. Finally, I use Ramya's way and it works well now.  Again, aprreciate all for helping me to solve the problem.   Ann --- On Wed, 1/12/11, Ramya harini ramyahar...@gmail.com wrote: From: Ramya harini ramyahar...@gmail.com Subject: Re: Redim array

Re: Redim array?

2011-01-11 Thread punj prakash
Because you have already fixed your array with size 5.Please go to QTP vbscript help to read more. On Tue, Jan 11, 2011 at 10:42 PM, ann hoang annthu2...@yahoo.com wrote: Hi all, Have anyone ever try to redim array? I try to redim array but it doesn't work. For example: first time, I have