All pastes #165265 Raw Edit

Something

public text v1 · immutable
·published 2006-09-09 18:05 UTC
rendered paste body
Public Sub displayNickList()

	Dim sNick	As String
	Dim i		As Integer
	Dim iFile	As Integer
	Dim sPathSave	As String
	Dim j		As Integer

	' Should NEVER be used, or as little as possible... you should fix errors instead of working around them :)
	On Error Resume Next

	j = 1311

	iFile = FreeFile()

	' Try to put as little spaces in filename as possible and go from biggest value to smallest for ordering purposes (yyyymmdd)
	sPathSave = "C:\" & Format(Date(), "yyyymmdd") & "_nickname" & ".txt"

	' Don't open in a loop...
	Open sPathSave For Output As iFile

	For i = 1 To lstUsers.ListCount - 1

		Print #iFile, "NameArray(" & (j + i) - 1 & ")" & " = " & lstUsers.List(i)
		MsgBox lstUsers.List(i)

	Next i

	Close iFile

End Sub