How to put a Dyno-Static path in Macros? (1 Viewer)

prabha_friend

Prabhakaran Karuppaih
Local time
Today, 17:23
Joined
Mar 22, 2009
Messages
771
Hi All,
I am Exporting a file from a Query using the ImportExportSpreadsheet action. I want to save that exported file to particular location. The problem is there is a static path but with a little dynamics in it. The Actual path:

C:\Users\N623905\Desktop\1137\Inut Files\Old Database\Import\WAM_report.xlsx

Required path:
Currentproject.path & "\Import\WAMP_report.xlsx"

Possible to do that without writing a custom vba function and using that in the macro action?

Thanks in advance.
 

namliam

The Mailman - AWF VIP
Local time
Today, 12:53
Joined
Aug 11, 2003
Messages
11,696
How is
Currentproject.path & "\Import\WAMP_report.xlsx"
Dynamic?

Best solution, not use macro at all, write "proper" VBA
 

prabha_friend

Prabhakaran Karuppaih
Local time
Today, 17:23
Joined
Mar 22, 2009
Messages
771
Any other way to make it happen inside a Macro action?
 

vbaInet

AWF VIP
Local time
Today, 11:53
Joined
Jan 22, 2010
Messages
26,374
I've mentioned it to prabha on different occasions namliam, but he's bent on using macros claiming that they are simple but yet effective. Macros are limited. Period!

CurrentProject isn't recognised as an action or a property in a macro. Use VBA.
 

Users who are viewing this thread

Top Bottom