Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I currently have a macro that displays the selected values of a field in a listbox.
set s = ActiveDocument.Fields("DrillField").GetSelectedValues
for i = 0 to s.Count-1
msgbox(s.Item(i).Text)
next
However, no matter the order I select the values in the list box, the array of selected values always comes back the same as the listbox's sort order. Is there a way to retrieve the selected values of the field in the order that they were selected?
Thanks.
James
Hi,
There is no need to eliminate duplicates manually. You can use
=Concat(DISTINCT FieldName, ',')
Regards,
Jagan.
Is there a way to remove a single value from the concatenated string? Would you use something like a replace with an empty string? That would certainly simplify the code.
Interesting. I like it. You may want to turn off "Allow Pivoting" in the Presentation properties. If I drag a dimension and them make a selection I lose my dragged change.
-Rob
Good point. I'll disable that. Thanks.