Lyndon Bermoy Active Member Licensed User Longtime User Mar 30, 2015 #1 Im having a problem with this code: Code: Copy Dim x As List x.Initialize x.AddAll(Array As Int(20, 35, 50, 65)) rbAnswer1.Top = x.Get(Rnd(0,4)) & "%y" rbAnswer2.Top = x.Get(Rnd(0,4)) & "%y" rbAnswer3.Top = x.Get(Rnd(0,4)) & "%y" rbAnswer4.Top = x.Get(Rnd(0,4)) & "%y" I want to randomize the position of my radiobutton from only the given value of my List. Im having an error of "Invalid Double". But everytime i deleted "%y" on it, it never shows error. But I really need to have "%y" on it. Please help me. Asap
Im having a problem with this code: Code: Copy Dim x As List x.Initialize x.AddAll(Array As Int(20, 35, 50, 65)) rbAnswer1.Top = x.Get(Rnd(0,4)) & "%y" rbAnswer2.Top = x.Get(Rnd(0,4)) & "%y" rbAnswer3.Top = x.Get(Rnd(0,4)) & "%y" rbAnswer4.Top = x.Get(Rnd(0,4)) & "%y" I want to randomize the position of my radiobutton from only the given value of my List. Im having an error of "Invalid Double". But everytime i deleted "%y" on it, it never shows error. But I really need to have "%y" on it. Please help me. Asap
NJDude Expert Licensed User Longtime User Mar 30, 2015 #2 Just create your list like this: Code: Copy ... x.AddAll(Array As Int(20%y, 35%y, 50%y, 65%y)) ... rbAnswer1.Top = x.Get(Rnd(0,4)) Upvote 0
Just create your list like this: Code: Copy ... x.AddAll(Array As Int(20%y, 35%y, 50%y, 65%y)) ... rbAnswer1.Top = x.Get(Rnd(0,4))