Relative path in a macro

G

Guest

I am trying to use the TransferSpreadsheet and OutputTo commands in a macro,
so that the files created are stored on the same path as the database itself.
I do not want to type the entire path, because I want to be able to place the
database in different people's drives, in any directory, and have the
resulting files be created in that same directory.

Can this be accomplished with macros?
 
K

Ken Snell [MVP]

Use an expression like this as the FileName argument:

=CurrentProject.Path & "\" & "MyFileName.xxx"
 

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