Hi folks,

I can use the following code to save the entire contents of a listbox to a text file, but I can't work out how to just save the selected items (I have multiselect set to 2).

Any ideas?

Simon

Dim file As String
file = "temp.dat"

On Error Resume Next
Open file For Output As #1
For i = 0 To lstWorkstations.ListCount - 1
a$ = lstWorkstations.List(i)
Print #1, a$
Next
Close #1