Generating Random numbers

I need to generate random numbers between 0 and 19 ( 20 questions )

I´m using Int( inpQtdQuestoes.value * Rnd) ) but it never generate the number 0, it´s because I´m using the INT() function ?:

Tjanks in advance !

How about Fix(Rnd*19)

I’ll try it, thank you so much!

It worked so fine !! !! !!

I’m not sure you will ever get 19.

Use Round(Rnd*19) instead

It´s Worked fine ! It´s including the number 0 on the generation, it´s
important, because the arrays begin with “0” as index , instead of 1 !

Thank you so much for the help !

RICARDO CASSOLATTO

Business Consultant
sintetik@gmail.com / 21 98196-0504

FastMobile
http://fastmobile.info
http://www.facebook.com/ricardo.cassolatto
https://br.linkedin.com/in/ricardo-cassolato-9ba225