Start New Discussion within our Software Development Community

Hi, can any one tell me how to create variables during runtime.

This what we generally do when we need to create string of fixed length like -

dim x as string * 5

now i also need to do it dynamically. suppose i need to declare two individual variables of string type in runtime. as i don't know how much i need to declare so i can't do it in design mode. now if my requirement is 2 then there should have 2 variables been declared like this -

dim x as string * 5
dim y as string * 6

one more thing i can't use array in this case as i also need to define their lengths in runtime. because i think elements can be created within an array dynamically but defining size to each and every element is not possible.

So, is there any way to overcome this?
Plz..........i really need help to figure this out.

It will be great if someone post some links to such similar things here.

Thanks to all................in advance.

iam not clear about your issue, Why do you want to create multiple variable on runtime? WHat do you want to accimplish. You can use ReDim and Preserve to control the arrays as per your need.

This article has been dead for over six months. Start a new discussion instead.