B
Bloodking
Guest
Hello, I'm trying to create a program that takes the first letter of each word and places them into a label. I have a For...Next Loop. This is my code
However, it only gets the first word's first letter and last words' first letter(Example: I type in World of Warcraft it says WW instead of WoW)
Please help!
Code:
Dim Wordcount As Integer
Dim txtWords As String
Dim count As Integer
Dim word As String
Dim space As Integer
Dim letter As String
Wordcount = InputBox("Enter how many words there are.")
txtWords = InputBox("Enter the words.")
word = txtWords
letter = word.Substring(0, 1)
For count = 0 To Wordcount
space = word.IndexOf(" ")
word = word.Remove(0, space + 1)
letter = letter + word.Substring(0, 1)
Next
Me.Label1.Text = letter
Please help!