L
LEU
I have the following macro that loads my ListBox1. When it initializes it
looks like this:
0 \John Smith \01/01/08 \ and so on
1 \Jane Doe \01/10/08 \ and so on
2 \Bob Jones \01/12/08 \ and so on
My question is can the order be reversed so it looks like this:
2 \Bob Jones \01/12/08 \ and so on
1 \Jane Doe \01/10/08 \ and so on
0 \John Smith \01/01/08 \ and so on
If it can’t be done can you tell it to highlight the last one in the list
instead of the first one when the form opens?
Private Sub UserForm_Initialize()
On Error GoTo Err_Handler
Dim myArray
Dim pValue As String
pValue = ActiveDocument.Variables("varC")
myArray = Split(pValue, "|")
With ListBox1
.List = myArray
.ListIndex = 0
End With
Exit Sub
Err_Handler:
If Err.Number = 5825 Then MsgBox "File does not exists Yet"
Unload Me
End Sub
looks like this:
0 \John Smith \01/01/08 \ and so on
1 \Jane Doe \01/10/08 \ and so on
2 \Bob Jones \01/12/08 \ and so on
My question is can the order be reversed so it looks like this:
2 \Bob Jones \01/12/08 \ and so on
1 \Jane Doe \01/10/08 \ and so on
0 \John Smith \01/01/08 \ and so on
If it can’t be done can you tell it to highlight the last one in the list
instead of the first one when the form opens?
Private Sub UserForm_Initialize()
On Error GoTo Err_Handler
Dim myArray
Dim pValue As String
pValue = ActiveDocument.Variables("varC")
myArray = Split(pValue, "|")
With ListBox1
.List = myArray
.ListIndex = 0
End With
Exit Sub
Err_Handler:
If Err.Number = 5825 Then MsgBox "File does not exists Yet"
Unload Me
End Sub