SOLVED
The goal of this random function is to return a value which will be used to capitalize the corresponding line with that number, my issue is that it returns 5 every time, so something must be going wrong. Can anyone explain what I did wrong with this randomize function?
EDIT: I now get the error “randomize is a type, and cannot be used as an expression”.
Here the piece of code: randomize is a type and cannot be used as an expression.
Module randomize
Sub Main()
Dim line As String = ""
Dim linenum As Integer = 1
Randomize()
Dim random as Integer
random = CInt(Int((7 * Rnd()) + 1))
'If linenum=random the line is capitalized.
Per the MSDN documentation for
Rnd, you need to callRandomizefirst to create a new seed.Also, I’m not sure if it’s a good idea naming your module after the function you need to call.