Results 1 to 7 of 7

Thread: permision denied

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446
    After running my app, i cannot re-run the app due to a an error message "RUN TIME ERROR 70"
    "PERMISIION DENIED"
    I do a lot of file handling and wondered if there is a way in the environment ot see if any files handles etc are still open.

    Many thanks Gary


  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    I think you can check that with this in the debug window:
    Code:
    ? FreeFile '(?=Print)

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446

    reply

    Just gave me the number 1, any other clues or is this my clue freefile 1?

    Gary


  4. #4
    Guest
    I got around the error 70s in an application (on the Open for input line) by trapping it in the error handler and issuing a sleep command for a couple of seconds and then resuming the same open statement.

    Apparently one of the modules was trying to open the files which was not yet done with by another app. Honestly, it worked like magic for us.

    I would also like to know if there is a way to see if a file handle is open.


  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446

    SAMPLE

    Do you have a sample example.?

    GARY

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    To be really sure, you can use close method without filenumber.
    Code:
    Close
    it will close all files and it won't cause any errors if there are no files open.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  7. #7
    Guest
    To get the next open file handle, you can use FreeFile. The FreeFile function will return an integer with the next file number available.

    To see if one is open,

    Code:
    On Error Resume Next
    Open FileName For Input As TheOneYouWantToCheck
    If Err.Number = 70 Then
       MsgBox "in use"
    Else
       Close TheOneYouWantToCheck
    End If
    I think that works.

    Sunny

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