R
Robert
Hi
I am pretty new to prgramming and i'm having a spot of trouble with one
of my programs, i would like to, when a condition occurs chnge the property
of label1.text to a random letter of the alphabet
i have made an array called alphabet(25) for all letters.
here is what i have so far
dim alphabet(25) as string < this is declared outside a private sub, the
rest is inside one
alphabet(0) = ("a")
alphabet(1) = ("b")
alphabet(2) = ("C")
alphabet(3) = ("d")
alphabet(4) = ("e")
alphabet(5) = ("f")
alphabet(6) = ("g")
alphabet(7) = ("h")
alphabet(8) = ("i")
alphabet(9) = ("j")
alphabet(10) = ("k")
alphabet(11) = ("l")
alphabet(12) = ("m")
alphabet(13) = ("n")
alphabet(14) = ("o")
alphabet(15) = ("p")
alphabet(16) = ("q")
alphabet(17) = ("r")
alphabet(18) = ("s")
alphabet(19) = ("t")
alphabet(20) = ("u")
alphabet(21) = ("v")
alphabet(22) = ("w")
alphabet(23) = ("x")
alphabet(24) = ("y")
alphabet(25) = ("z")
IF <condition> then
Label2.Text = ("GO!")
label1.text = (Rnd(alphabet(25))) <<<<<< this is the line i am having
trouble with
TextBox1.Text = ("")
end if
i get an error on debug saying
'cast from string "a" to type 'single' is not valid
help would be very much appreciated
thanks Robert
I am pretty new to prgramming and i'm having a spot of trouble with one
of my programs, i would like to, when a condition occurs chnge the property
of label1.text to a random letter of the alphabet
i have made an array called alphabet(25) for all letters.
here is what i have so far
dim alphabet(25) as string < this is declared outside a private sub, the
rest is inside one
alphabet(0) = ("a")
alphabet(1) = ("b")
alphabet(2) = ("C")
alphabet(3) = ("d")
alphabet(4) = ("e")
alphabet(5) = ("f")
alphabet(6) = ("g")
alphabet(7) = ("h")
alphabet(8) = ("i")
alphabet(9) = ("j")
alphabet(10) = ("k")
alphabet(11) = ("l")
alphabet(12) = ("m")
alphabet(13) = ("n")
alphabet(14) = ("o")
alphabet(15) = ("p")
alphabet(16) = ("q")
alphabet(17) = ("r")
alphabet(18) = ("s")
alphabet(19) = ("t")
alphabet(20) = ("u")
alphabet(21) = ("v")
alphabet(22) = ("w")
alphabet(23) = ("x")
alphabet(24) = ("y")
alphabet(25) = ("z")
IF <condition> then
Label2.Text = ("GO!")
label1.text = (Rnd(alphabet(25))) <<<<<< this is the line i am having
trouble with
TextBox1.Text = ("")
end if
i get an error on debug saying
'cast from string "a" to type 'single' is not valid
help would be very much appreciated
thanks Robert