
Simple print listbox to disk problem!
Change the loop to:
For i = 0 To lstEmployeeNetPay.ListCount - 1
Print #1, lstEmployeeNewPay.List(i)
Next i
Lee Weiner
weiner AT fuse DOT net
Quote:
>I am trying to take the contents of a list box (it can only be 10
>lines long)
>and print it to disk. This is what I am trying right now (it
>doesn't work either).
>Any ideas would be GREATLY APPRECIATED!
>__________________________________________
>Private Sub mnuFilePrintToDisk_Click(Index As Integer)
>Dim R As Integer
>dlgCommon.Filter = "Text Files(*.txt)|*.txt|All Files(*.*)|*.*"
>dlgCommon.filename = ""
>dlgCommon.ShowSave
>R = 0
>Open dlgCommon.filename For Output As #1
>Do
>Print #1, lstEmployeeNetPay.ListIndex
>Loop Until lstEmployeeNetPay = ""
>Close #1
>End Sub
>______________________________________________
Lee Weiner
weiner AT fuse DOT net