Can Redim be used to declare a new array ?
Answer Posted / ashok s bhosale
Redim can be Used Create New array of different length
eg
Dim arr() As Integer
ReDim arr(3)
arr(0) = 1
arr(1) = 2
arr(2) = 3
MsgBox arr(0) & ":" & arr(1) & ":" & arr(2)
'It Print 1,2,3
ReDim arr(4)
MsgBox arr(0) & ":" & arr(1) & ":" & arr(2) & ":" & arr(3)
it display 0,0,0,0
it reinitilize all element to 0 it means it create new Array
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How would you create properties by using class Builder Wizard?
How would you create Visual basic Document file?
What is dao in vba?
How can you get selected file from file system Control?
Explain about the creation of EXE files with Visual Basic?
What do you mean by provider?
How do I create controls dynamically (at run-time)?
Draw Sequence Modal of RDO? Explain.
Which method is preferred to save data like database to the disk?
What are the properties of datacontrol?
what is the Difference between Dynaset and Snapshot?
What are the types of API Types.
Explain about an event-driven programming language?
How do I mimic a toggle button?
How about Access 2.0 compatibility?