I'm trying to open a file in a folder on every user's desktop. The file exists in a folder called "Resources". I tried to use the code from this posting; http://www.excelforum.com/excel-prog...op-folder.html
but it's not working. My code exists in the "Workbook/Open" module. I'm getting a Run-Time error of 1004, saying it can't find the file. I'd appreciate any help you can provide in trouble-shooting my code.
Thanks,
John
Option Explicit
Public Function GetDesktop() As String
GetDesktop = CreateObject("WScript.Shell").SpecialFolders("Desktop") & _
Application.PathSeparator
End Function
Private Sub Workbook_Open()
With Application
.ScreenUpdating = False
.EnableEvents = False
Dim Path As String
Dim FileName1 As String
Path = GetDesktop & "Resources\"
Path = Path & Application.PathSeparator
FileName1 = Dir(Path & "PAID_FTES_BR2010.xls", vbNormal)
Workbooks.Open FileName1, ReadOnly:=True
Bookmarks