games-hints
January 7th, 2000, 07:39 PM
What I want to do is take a sentance- "Hello Bob" and split it letter-by-letter so
word(1)=H
word(2)=e
word(3)=l
word(4)=l
word(5)=o
word(6)=b (or blank for the space)
word(7)=o
word(8)=b
Can Anyone Help?
Thanks
wilton
January 7th, 2000, 07:43 PM
Create a string.
Fill the string with Your text: "Hello Bob"
Then use a do while loop to parse the string character by character setting your array equal each letter as it gets past. Look up the Left$ string function in your help and it should give you an idea of how things are done
January 9th, 2000, 11:04 AM
Hi !
Using the following code you can print a single letter from a word. To a new form add one command button and get it print to
the form.
Private Sub Command1_Click()
Dim strInput As String
Dim strWord(1 To 12) As String
Dim intLen As Integer
strInput = InputBox("Enter String")
intLen = Len(strInput)
For I = 1 To intLen Step 1
strWord(I) = Mid(strInput, I, 1)
'strInput = Mid(strInput, 1)
Form1.Print "strWord(" & I & ")=" & strWord(I)
Next I
End Sub
Satya N Chandu
E Mail Address : snchandu@hotmail.com