I have an existing VBA program that populates a ListBox(A) with a query. User selects the first line in ListBox(A) and enters data into another ListBox(B). User then selects the next line in Listbox(A) and enters data into the next line in ListBox(B). Works great.
All I want to do is program the select and highlight the first line in ListBox(A) when ListBox(A) is populated by the query at the start of the program and set the focus to the first line in ListBox(B).
My code to select ListBox(A) entry number 1 is below. It does highlights the first entry fine.
formName.selected(1) = True
The coding in the program makes use of the itemsSelcted property to process the correct manual selected line. This property is not being set correctly by the above code and any other efforts I have tried to set it or reference it to the selected line have not worked. The program still works fine if I manually select the line.
What am I missing here.
Thanks for any direction guidance.
Gary
All I want to do is program the select and highlight the first line in ListBox(A) when ListBox(A) is populated by the query at the start of the program and set the focus to the first line in ListBox(B).
My code to select ListBox(A) entry number 1 is below. It does highlights the first entry fine.
formName.selected(1) = True
The coding in the program makes use of the itemsSelcted property to process the correct manual selected line. This property is not being set correctly by the above code and any other efforts I have tried to set it or reference it to the selected line have not worked. The program still works fine if I manually select the line.
What am I missing here.
Thanks for any direction guidance.
Gary