Paul,
You can't change the path in the dialog, but I think you already knew that
as you were trying a ChDir before the dialog. This works with local, or
mapped drives, but will not work with a UNC path. That is a bit harder, but
not too hard.
Here is some code that will set the UNC path for you, and GetOpenFileName
will reflect that path.
Private Declare Function SetCurrentDirectoryA Lib "kernel32" _
(ByVal lpPathName As String) As Long
Sub macroopen()
Dim sPath As String
sPath = "\\wxp2000\Joe Docs\Joe\Reports"
If SetUNCPath(sPath) <> 0 Then
Application.GetOpenFilename ("Excel,*.xls")
Else
MsgBox "Error in setting the UNC path - " & sPath
End If
End Sub
Function SetUNCPath(sPath As String) As Long
Dim lReturn As Long
lReturn = SetCurrentDirectoryA(sPath)
SetUNCPath = lReturn
End Function
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)