View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Kevin Kevin is offline
external usenet poster
 
Posts: 134
Default a challange for the "real" programmers

To set the default file path, you need the following line.

Application.DefaultFilePath = "k:\folder1\folder2"

The problem with this simple line of code, is it will
change the users default setting. To avoid that problem
for the user, I save the initial setting at startup, then
reset the default value. When the application is closed, I
reset the default value back to what it was when the file
was opened.

Also I believe the SaveCopyAs method will take a complete
file path, but you need to test for sure.

Hope that helps!

Kevin

-----Original Message-----

This one probably isn't as hard as I'm making it out to

be...

Lets say I have a cell, a1, on sheet1 that contains

text. now lets say
i want the filename to be PTI and then the text from that

cell. In
excel speak that would be "PTI"&sheet1!a1 , if i am not

mistaken. I
want that filename to be the default one in the dialog

box, so we don't
have to type it in everytime.

It would be really nice if I could also figure out how to

make a
specific folder on a specific drive the default path

instead of My
Documents.

So the final filename would look like:

k:\folder1\folder2\PTI[text from sheet1!a1]

Then all i would have to press is save, unless i wanted

to change it.
but since that is what it will be 99% of the time, that

is how i want
it.

If anyone thinks they have a handle on this one, I'd

appreciate some
guidance.

Thanks


--
jacksonz
----------------------------------------------------------

--------------
jacksonz's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=13728
View this thread:

http://www.excelforum.com/showthread...hreadid=262475

.