Ok...
Ok in the second part of that code with the Check1.Value I want it to add "-" to the end of each name upon loading of a file(To list1).Thx guys!You guys rockVB Code:
Dim sText As String Dim intFileNum As Integer If Form3.Text1.Text = "" Then 'On Error GoTo 1 (This is very bad practice) With CD1 .DialogTitle = "Open Name File" .Filter = "All Supported Types|*.usr;*.txt;*.dat|" .ShowOpen intFileNum = FreeFile On Error Resume Next Open .FileName For Input As #intFileNum While Not EOF(intFileNum) Input #intFileNum, sText$ If sText$ = "" Then Exit Sub Else List1.AddItem sText$ DoEvents End If Wend Close #intFileNum End With Else If Check1.Value = vbChecked Then With CD1 .DialogTitle = "Open Name File" .Filter = "All Supported Types|*.usr;*.txt;*.dat|" .ShowOpen intFileNum = FreeFile On Error Resume Next Open .FileName For Input As #intFileNum While Not EOF(intFileNum) Input #intFileNum, sText$ If sText$ = "" Then Exit Sub Else List1.AddItem sText$ DoEvents End If Wend Close #intFileNum End With End If End If Label1.Caption = "Word's: " & List1.ListCount End Sub![]()


Reply With Quote
