1

I have a randomly generated string which is generated at runtime.

I want to capture the value of that string into an array such that

  • the first word of the string becomes the first element in the array,

  • second word the second element

    and so on.

Please help

1 Answer 1

2

In VBscript use the Split function:

dim myArray, myString
myString = "This is an example"
myArray = Split(myString)
Sign up to request clarification or add additional context in comments.

2 Comments

This My array would be the name of the array..Rite? dim rndstr() rndstr=split(string) It shows type mismatch error..
Remove the parenthesis: dim rndstr rndstr=split(string) Updating my answer to give a complete example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.