Results 1 to 40 of 68

Thread: RESOLVED - Suggestions to resolve Runtime Error 75 path/file access denied

Hybrid View

  1. #1
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Suggestions to resolve Runtime Error 75 path/file access denied

    I think you're missing the point of my comment about your hhh variable. The way your code is now your obr9f, a, i, j, and k variables will never contain anything because you fill hhh and then immediately set it to vbNullString. If you don't set it to vbNullString the variables willl all contain the same value. The following is some code that shows both cases. Paste it into a new project and try it.

    Code:
    Dim hhh As String
    Dim obr9f As String
    Dim obr9a As String
    Dim obr9i As String
    Dim obr9j As String
    Dim obr9k As String
    
    hhh = "fullscan"
    
    hhh = vbNullString
    
    obr9f = Mid(hhh, InStr(hhh, " ") + 1)
    obr9a = Mid(hhh, InStr(hhh, " ") + 1)
    obr9i = Mid(hhh, InStr(hhh, " ") + 1)
    obr9j = Mid(hhh, InStr(hhh, " ") + 1)
    obr9k = Mid(hhh, InStr(hhh, " ") + 1)
    
    MsgBox obr9f
    MsgBox obr9a
    MsgBox obr9i
    MsgBox obr9j
    MsgBox obr9k
    
    'do it again without the vbNullstring line
    
    hhh = "fullscan"
    
    obr9f = Mid(hhh, InStr(hhh, " ") + 1)
    obr9a = Mid(hhh, InStr(hhh, " ") + 1)
    obr9i = Mid(hhh, InStr(hhh, " ") + 1)
    obr9j = Mid(hhh, InStr(hhh, " ") + 1)
    obr9k = Mid(hhh, InStr(hhh, " ") + 1)
    
    MsgBox obr9f
    MsgBox obr9a
    MsgBox obr9i
    MsgBox obr9j
    MsgBox obr9k
    Regarding this code:
    Code:
    Open sErrorLogPath For Output As #hFile
    Close #hFile
            
    If List2.ListCount > 1000 Then
    
        List2.Clear
        
        Close #hFile
        hFile = FreeFile
        
        Open sErrorLogPath For Append As #hFile
    You don't need to open and immediately close the file in order to create/ set up the file on the hard drive for the list count. Just do the Open sErrorLogPath For Append As #hFile when you need it. VB will create the file if it's not already there even though you specified Append.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Location
    SF
    Posts
    93

    Re: Suggestions to resolve Runtime Error 75 path/file access denied

    Hey Martin,

    sorry about that. The hhh variable will not be empty once the keyword is processed from the pop3 email. The code spins through all the emails in the inbox. Once it finds the keyword, the hhh will then contain the keyword.

    If you run the whole project, it will give a demo.

    Thanks. I've changed up the code to use append only.

    Techsent

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Suggestions to resolve Runtime Error 75 path/file access denied

    Quote Originally Posted by techsent View Post
    Hey Martin,

    sorry about that. The hhh variable will not be empty once the keyword is processed from the pop3 email. The code spins through all the emails in the inbox. Once it finds the keyword, the hhh will then contain the keyword.

    If you run the whole project, it will give a demo.

    Thanks. I've changed up the code to use append only.

    Techsent
    Yes, it will, because you set it to vbNullString immediately after it is filled. And even if that is not the case, all the obr9 variables that I mentioned will have the same thing in them. Is that what you want?

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Location
    SF
    Posts
    93

    Re: Suggestions to resolve Runtime Error 75 path/file access denied

    I see what you're saying. when I originally created the main project, I copied the obr9 variables from it into the pop3 connect.

    I could have used 1 variable and passed it to main (timer44, timer43).

    Techsent

  5. #5

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Location
    SF
    Posts
    93

    Re: Suggestions to resolve Runtime Error 75 path/file access denied

    I do indeed.

    Techsent

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