Hi everyone,

I have 4 textboxes on form1. On runtime the user will be asked to fill in names. After that, I want these names placed RANDOMLY on 4 labels (form2). How should I do that? I am trying it for ages but I still don't have a clue to get them random.

Please help me.

Cindy

Random is about numbers in vb6.

You should represent your labels as a number, and ask for one of the numbers in a random number generator function.

So, for each textbox. You could say, "RandomNumberGenerator function, give me a number between 1 and 4."

For example,

It returns 3.

See if the 3 label has a value, if not put the name there (from the textbox).

If it does have a value, keep askin the RandomNumberGenerator to give you another number until you get a clean label to populate.

keep going until you get your labels filled (all 4 of them).

Your technical challenge is with the Random generator function. You'll need to make it give you a value of only between 1 and 4. Let me know if you need help with this.