Results 1 to 8 of 8

Thread: Resolved: having trouble opening a file

Hybrid View

  1. #1

  2. #2
    Lively Member Something Else's Avatar
    Join Date
    Nov 2003
    Location
    Where Humboldt Intersects Carlson
    Posts
    99

    Re: having trouble opening a file

    Marty,
    What is Quick Watch {Darn the focus loss! What, is THIS add now doing that!!!}

    Anyways,

    You could also do a msgbox. ie...
    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3.  
    4. k = 5 'temporary file length
    5. 'open "c:\usrtest.txt" for input as #1  '<<this line works when i swap it in  
    6. MsgBox( strDataFileName )
    7. Exit sub
    8. Open strDataFileName For Input As #1    '<<this line won't when i select the same file  
    9.    ReDim Node(2, k)
    10.    i = 0
    11.    Do While Not EOF(1)
    12.         Input #1, lLat
    13.         Input #1, lLon
    14.         Input #1, bCon
    15.        
    16.         Node(0, i) = lLat
    17.         Node(1, i) = lLon
    18.         Node(2, i) = bCon
    19.        
    20.        
    21.         i = i + 1
    22.        
    23.     Loop
    24.     Close #1
    25.      i = 0
    26.      
    27.     Label3.Caption = Node(0, 0) & Node(1, 0) & Node(2, 0)
    28.     For i = 0 To k
    29.         Debug.Print Node(0, i); Node(1, i); Node(2, i)
    30.     Next i
    31.    
    32. End Sub
    no soap...radio -mendhak

    I understand...just a little...
    No comprende, it's a riddle
    - Wall of Voodoo-Mexican Radio

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    47

    Re: having trouble opening a file

    OK<

    i used the message box idea to look things over, the path is correct after it is selected, then it is still the same after it displays in the label2.caption but it is blank right before the open???

    what gives with that, is there something that could happen in between?

    thanks for the responses so far,

    jerry

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