Can the user "Choose" the path via a VBA command?

  • Thread starter Thread starter Brad Patterson
  • Start date Start date
B

Brad Patterson

I wish to work in a directory chosen by a user.

At the moment, I can¹t seem to get it to recognise the folder where the user
chooses a file with the ³Application.GetOpenFilename² command. I thought
that this would be the easiest way, in that the user could choose a file in
the folder they wanted to work in and I¹d change it somehow ­ not so.

Any ideas ?
 
Cannot see what your problem is. The following returns the full path
on my PC (XL97/Windows NT4)

f = Application.GetOpenFilename
MsgBox (f)


Regards
BrianB
==========================================================
 
Can the user "Choose" the path via a VBA command?You can put up the
directory selection dialog:

http://j-walk.com/ss/excel/tips/tip29.htm
How to select a directory

found at John Walkenbach's site.

--
Regards,
Tom Ogilvy


I wish to work in a directory chosen by a user.

At the moment, I can't seem to get it to recognise the folder where the user
chooses a file with the "Application.GetOpenFilename" command. I thought
that this would be the easiest way, in that the user could choose a file in
the folder they wanted to work in and I'd change it somehow - not so.

Any ideas ?
 
Brad said:
I wish to work in a directory chosen by a user.

At the moment, I can’t seem to get it to recognise the folder where the
user chooses a file with the “Application.GetOpenFilename” command. I
thought that this would be the easiest way, in that the user could
choose a file in the folder they wanted to work in and I’d change it
somehow – not so.

Any ideas ?

Look at the CHDIR command this will allow you change to the desired
directory prior to using GetOpenFileName command.
 
Back
Top