That was my original question, how would I do that? This is the best I've come up with and I HAVE to have the space before |Mr. or the whole thing breaks when there isn't a value created for Prefix1.
Private Sub UserForm_Initialize()
Dim myPrefixes() As String
myPrefixes = Split(" |Mr. |Ms. |Det. |Dr. |Atty. |Rabbi |Ofc. |Sgt. |Cpl. |Maj. ", "|")
Prefix1.List = myPrefixes
If Prefix1.Value = Text Then
Prefix1 = ActiveDocument.Variables("Prefix1")
Else: ActiveDocument.Variables("Prefix1") = "Mr. "
End If
End Sub
|