• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 163
  • Last Modified:

Printing individual items in a list box

Hello. This is a basic question, I'm sure. I am trying to print to a sequential file the individual items that I have selected from a list box. So far I have only been able to get the index number of the items to print, not the actual name of the item. How can I print the actual name of the list items when they are selected? Thanks.
0
Ahobs
Asked:
Ahobs
1 Solution
 
Hornet241Commented:
try this

ff = FreeFile
Open "C:\YourFileName.Ext" for Output as #ff

For a = 0 to List1.Listcount - 1
    If List1.Selected(a) Then
        Print #ff, List1.List(a)
    End If
Next a

Close #ff
0
 
AhobsAuthor Commented:
Thanks for the speedy reply. It works!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now