I tried again with this code
I put this code on a pushbutton, each time I push it, I have different number. I would like to have the same number because I have seed it.![]()
Randomize(1) msgbox Rnd
I tried again with this code
I put this code on a pushbutton, each time I push it, I have different number. I would like to have the same number because I have seed it.![]()
Randomize(1) msgbox Rnd
I understood how to use it.
I have to put a negative number for Rnd first and then use Randomize :
![]()
Dim i As Long Const Max As Long = 10 Cells.ClearContents Rnd (-10) Randomize (1) For i= 1 To Max Cells(i, 1).Value = Rnd() Next
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks