Micro Focus QTP (UFT) Forums
Error in Array - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Error in Array (/Thread-Error-in-Array)



Error in Array - Rekhapramod - 02-23-2011

Hi All!

I am getting the below error stating that
"The Array is fixed or temporarily locked" while using ReDim
Pls give me the solution.

Regards,
RekhaPramod



RE: Error in Array - manishbhalshankar - 02-23-2011

Hi Rekha,

Can you provide the code?


RE: Error in Array - Rekhapramod - 02-23-2011

I just gave

Dim a(5)
ReDim a(10)

Regards,
Rekha.K


RE: Error in Array - TurtleRock - 02-23-2011

Hi,

To use ReDim statement you should create an array with no size.

Dim a(5)
This statement will create an fixed size array, so you can not use redim with this array.

Instead Use :
Code:
Dim a()    
ReDim a(10)
ReDim a(20)


Cheers
TurtleRock



RE: Error in Array - Rekhapramod - 02-23-2011


Thanks its working fine now