Why will dir() will not connect to my drive

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rodney Roe

    #1

    Why will dir() will not connect to my drive

    I'm using this code and the dir(FullPath) will not connect to my drive until I physically open the drive first then it works perfectly. Is there something that i'm missing? I also tried using the chdir "G:\" before it to try and get it to look at the directory but it does the same thing.

    Code:
    If Dir(FullPath) = vbNullString Then
        MsgBox "File does not exist."
    Else
        ActiveWorkbook.FollowHyperlink FullPath
    End If
    any help would be appreciated
    thanks,
Working...