Help for beginner needed!
Hi All. I'm having trouble with some code and I'm sure I'm making it harder than it has to be. I'm trying to display all of the items contained in a combo box in a Message Box but I can't seem to get it to work properly. Any ideas on how to get it going? Here's the code I've been fiddling with but no matter what I try, I can only get one item to display in the message box.
VB Code:
'Handles the click event for the Yacht Types button under the File Menu.
Dim intIndex As Integer = 0
Dim YachtTypes As String
For intIndex = 0 To intIndex = cboYachtType.Items.Count - 1
YachtTypes = CStr(cboYachtType.Items(intIndex))
Next
MessageBox.Show("Yacht Type Summary" & ControlChars.CrLf _
& "Brian Reid" & ControlChars.CrLf & ControlChars.CrLf _
& "Yacht Types: " & YachtTypes, "Yacht Summary", _
MessageBoxButtons.OK, MessageBoxIcon.Information)
Thanks for the help! Brian