How can I control the order of the items in the message? I had assumed they would appear in the order I listed them on the form and in the code, but that doesn't happen. I have the following:
[vba]ControlNames = Array("Addressee's First Name", "Addressee's Surname", _
"Addressee's Address", "Letter Date", "Salutation", "Employee's First Name", _
"Employee's Surname", "Employer 1", "Employer 2", "Most Recent Position", _
"Start Date", "End Date", "Previous Position?", "Previous Position", _
"Previous Start Date", "Previous End Date")
Select Case strIn
Case "txtAddresseeFirstName"
DefineControlName = ControlNames(0)
Case "txtAddresseeSurname"
DefineControlName = ControlNames(1)
Case "txtAddress1"
DefineControlName = ControlNames(2)
Case "txtLtrDate"
DefineControlName = ControlNames(3)
Case "txtSalutation"
DefineControlName = ControlNames(4)
Case "txtEmployeeFirstName"
DefineControlName = ControlNames(5)
Case "txtEmployeeSurname"
DefineControlName = ControlNames(6)
Case "lstEmployer1"
DefineControlName = ControlNames(7)
Case "lstEmployer2"
DefineControlName = ControlNames(8)
Case "lstMostRecentPosition"
DefineControlName = ControlNames(9)
Case "txtStartDate"
DefineControlName = ControlNames(10)
Case "txtEndDate"
DefineControlName = ControlNames(11)
Case "lstPrevious"
DefineControlName = ControlNames(12)
Case "lstPreviousPosition"
DefineControlName = ControlNames(13)
Case "txtPreviousStartDate"
DefineControlName = ControlNames(14)
Case "txtPreviousEndDate"
DefineControlName = ControlNames(15)
End Select
End Function
[/vba]
Using the above, I get the message shown in the attached file. The first control on my form is for the addressee's first name. As you can see in the graphic, this field is halfway down the list in the message box. Since there are alot of controls on my userform, it would be nice if they could appear in the message box in order of use. Is that possible?