Click to See Complete Forum and Search --> : Explanation : Redim & Redim Preserve
omarswan
Jan 17th, 2000, 12:14 AM
Could someone clearly explain what is Redim & Redim Preserve, what are they used for and why they are used?
------------------
OmarSwan
omarswan@yahoo.com
http://www.omarswan.cjb.net
To God Be The Glory
netSurfer
Jan 17th, 2000, 12:25 AM
Roughly, you use redim when you are setting the dimensions of an array. You use Redim Preserve when you have declared it and put values in and need to change the dimensions without losing hte data.:
dim strTemp() as string - dims the array variable
redim strTemp(2) - sets the dimensions of hte array
strtemp(1) = "Test1"
strtemp(2) = "Test2"
redim preserve strTemp(3)
strtemp (3) = "test3"
Hope that helps
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.