I want to generate an unpredictable random integer number but i dont know how. Below is my function to generate between (1 to 8)which keeps returning '6' on first run which is predicted and also, i dont want the numbers to repeat itself.
Private Function RandomIt(Hv As long, Lv As long) As long
RandomIt = Int((Hv - Lv + 1) * Rnd + Lv)
Please can someone help me out as i want to resume my work urgently.