Results 1 to 5 of 5

Thread: PAth/File Access Error

  1. #1

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    PAth/File Access Error

    trying to run the following code on an EXE (Actually Excel)
    and Im getting the following error
    Error 75
    Path/File Access Error??

    if I take off the Access Read Write etc...it works...until it hits PUT

    any clues?

    [Highlight=VB]
    Private Sub ReverseByteNumbers(ByVal FileName As String)
    Dim K As Long, byteArr() As Byte, FL As Integer

    FL = FreeFile
    Open FileName For Binary Access Read Write Lock Read Write As FL

    ReDim byteArr(LOF(FL) - 1)
    Get FL, , byteArr

    For K = 0 To UBound(byteArr)
    byteArr(K) = Not byteArr(K)
    Next K

    Put FL, 1, byteArr

    Close FL
    End Sub
    [vbcoce]
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: PAth/File Access Error

    You are operating sequentially. If you want to write from the beginning just close it and open it again. If you want to use direct access, you need the word RANDOM, and you must write all records the same length, and specify the Len parameter when opening the file. The least amount of work required on your part woud be just to close the file momentarily.

  3. #3
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: PAth/File Access Error

    I just ran your code on several different files and it worked every time (including excel.exe). Are you trying to do this across a network?

    I would say with 99% certainty that you don't have the appropriate file access permissions to do what you're trying to do. That is basically what the error message is trying to tell you.
    Last edited by pnish; Feb 28th, 2005 at 11:40 PM.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  4. #4

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: PAth/File Access Error

    hmmm...

    i have full permission... (Its XP home)
    and its not over a network.....

    I try again tonight....
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  5. #5
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: PAth/File Access Error

    OK. Here's a simple test to establish whether it's a permissions thing. Try and delete excel.exe (make a copy first).
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

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