Hi there,

First of all i wish to apologise for what you might find any easy question, i am a beginner programmer, but i thank you for your time and guidance in advance.

I have a input form that has a number of check boxes on which relate the users enquiring courses. I need to create a loop of some sort that allows each checkbox to be checked it is selected. If so, output that within a message box. Thats it put simply anyway.

I have removed a lot of the code that is not related to this query but my code at the bottom is the message box that i wish to output all details in.

Currently in the message box it displays the number of checkboxes selected but i just need to link it to the related text and entered where it is highlighted in RED. I hope this undetailed and badly explained situation is enough for your understanding. Any guidance on this will be greatly appreciated. Thanks

************Current Code***********

Private Sub ButtonSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSubmit.Click
Dim VarEnquiredCourses As Integer
Dim Wrap As String
Dim AllCheckBoxes As CheckBox() = {CheckBoxVB10, CheckBoxJava, CheckBoxDreamweaver, CheckBoxCIW, CheckBoxCompMain, CheckBoxSage, CheckBoxPBook, CheckBoxMSOffice}
Dim Chk As CheckBox

'The Enquiring Courses Checkboxes

CheckBoxVB10.Text = "Visual Basic 10 "
CheckBoxJava.Text = "Java "
CheckBoxDreamweaver.Text = "Dreamweaver "
CheckBoxCIW.Text = "CIW "
CheckBoxCompMain.Text = "Computer Maintenance "
CheckBoxSage.Text = "Sage "
CheckBoxPBook.Text = "Practical Bookeeping "
CheckBoxMSOffice.Text = "Microsoft Office "

For Each Chk In AllCheckBoxes

If Chk.CheckState = 1 Then

VarEnquiredCourses = VarEnquiredCourses + 1

End If

Next

MsgBox(FirstName & " " & LastName & " would like to know details on the following courses" _
& Wrap & Wrap & VarEnquiredCourses & Wrap & Wrap & Wrap & "He is " & Age & " years old and" & AnOrA & ComboBoxCompExp.SelectedItem & _
" level computer user and wishes to start studying in " & MonthName(DatePickerOfStudy.Value.Month.ToString) & _
" " & Year(DatePickerOfStudy.Text) & Wrap & Wrap & _
"Our Courier Costs will be: £", vbOKOnly, "Request for course brochures")

End Sub