Results 1 to 12 of 12

Thread: Code Problem [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    154

    Code Problem [RESOLVED]

    VB Code:
    1. If Form3.Text1.Text = "" Then
    2. On Error GoTo 1
    3.     With CD1
    4.         .DialogTitle = "Open Name File"
    5.         .Filter = "All Supported Types|*.usr;*.txt;*.dat|"
    6.         .ShowOpen
    7. Dim sText As String
    8.     Dim x As Integer
    9.     x = FreeFile
    10.     On Error Resume Next
    11.     Open .FileName For Input As #x
    12.     While Not EOF(x)
    13.         Input #x, sText$
    14.             If sText$ = "" Then
    15.             Exit Sub
    16.             Else
    17.             List1.AddItem sText$
    18.             DoEvents
    19.             End If
    20.     Wend
    21.     Close #x
    22.         End With
    23. Label1.Caption = "Word's: " & List1.ListCount
    24.     Exit Sub
    25. 1
    26. End If
    27. End Sub
    28. Else
    29. If Check1.Value = vbChecked Then
    30. On Error GoTo 1
    31.     With CD1
    32.         .DialogTitle = "Open Name File"
    33.         .Filter = "All Supported Types|*.usr;*.txt;*.dat|"
    34.         .ShowOpen
    35. Dim sText As String
    36.     Dim x As Integer
    37.     x = FreeFile
    38.     On Error Resume Next
    39.     Open .FileName For Input As #x
    40.     While Not EOF(x)
    41.         Input #x, sText$
    42.             If sText$ = "" Then
    43.             Exit Sub
    44.             Else
    45.             List1.AddItem sText$
    46.             DoEvents
    47.             End If
    48.     Wend
    49.     Close #x
    50.         End With
    51. Label1.Caption = "Word's: " & List1.ListCount
    52.     Exit Sub
    53. 1
    54. End If
    55. End Sub

    This is my code im using but somehwere in it its really messed up. I appreciate all the help and would love some with this problem
    Last edited by $peed & $ex; Jan 11th, 2003 at 04:06 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width