Hi,
I have a file I want to open through VBA.
It is always on a network area e.g. \\server\sharename$.
I am using the code below to pick the filename
stFileName = Application.GetOpenFilename("Text Files (*.txt),*.txt"
(GetOpenFilename is an Excel function - I have imported the Excel library into my project)
This always points to C:\My Documents.
I have tried uing ChDir ("\\server\sharename$"
to change the current directory.
However, this does not change the current drive, and the GetOpenFilename method is still pointing to My Documents on C:
Can anyone tell me how to point to my network area?
Thanks,
Aidan Hughes
I have a file I want to open through VBA.
It is always on a network area e.g. \\server\sharename$.
I am using the code below to pick the filename
stFileName = Application.GetOpenFilename("Text Files (*.txt),*.txt"
(GetOpenFilename is an Excel function - I have imported the Excel library into my project)
This always points to C:\My Documents.
I have tried uing ChDir ("\\server\sharename$"
However, this does not change the current drive, and the GetOpenFilename method is still pointing to My Documents on C:
Can anyone tell me how to point to my network area?
Thanks,
Aidan Hughes