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

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 ?
 
B

BrianB

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
==========================================================
 
T

Tom Ogilvy

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 ?
 
I

Ian Gilmore

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top