Hi Friends,
I am trying in VBScript. I have names "Orange","Red", "Blue","Yellow" . I need any one of this names to be displayed randomly in MSGBOX. How can I do that. I tried the below code but it is not working. Can you correct it if it is wrong.
I am trying in VBScript. I have names "Orange","Red", "Blue","Yellow" . I need any one of this names to be displayed randomly in MSGBOX. How can I do that. I tried the below code but it is not working. Can you correct it if it is wrong.
Code:
<html>
<head>
<script type="text/vbscript">
Dim first() as String = {"Orange","Red","Blue","Yellow"}
MsgBox(first(Rnd))
</script>
</head>
</html>
Comment