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

prabha_friend

Prabhakaran Karuppaih
Local time
Tomorrow, 00:53
Joined
Mar 22, 2009
Messages
360
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, 21:23
Joined
Aug 11, 2003
Messages
11,521
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
Tomorrow, 00:53
Joined
Mar 22, 2009
Messages
360
Any other way to make it happen inside a Macro action?
 

vbaInet

AWF VIP
Local time
Today, 20:23
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 (Users: 0, Guests: 1)

Top Bottom