473,408 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Setting path of TransferDatabase Macro

21
Hi,
I have a database saved in ""D:\Database\v101" and some macros that import/export (transferSpreadsheet) the tables of it. These tables (approx 30 tables) are saved in a location "D:\Database\v101\tables".

After going through it with the user and I need to update it I create a new version and save that in "D:\Database\v102". Now the tables I export\import from the DB are should be saved into location "D:\Database\v102\tables".

The save location for the macros are hard coded in the macros. Is there a way that I can in one go set the save path in all the macros to "D:\Database\v102\tables" rather than going into the design view of each macro and manually changing it? Currently I have had 4 such new releases and each time i have had to manually change the macros. So imagine 30(tables)*2(import/export)= 60 macros to change with every release. Thats a LOT of work! Appriciate the help!
Sep 20 '10 #1
2 3448
NeoPa
32,556 Expert Mod 16PB
Use CurrentProject.Path in your macro code to refer to the current folder.
Sep 20 '10 #2
dileshw
21
Hi,
I tried "CurrentProject.Path" but it didnt work.
Basically the excel files should be exported to a subflder within the folder in which the database is.

Eg:
Database is in D:\Database\v100
Tables should goto D:\Database\v100\exported

But I get an error saying the path is not valid. (but all the folders are created and paths are corrects)

basically I said the destination should be
CurrentProject.Path\exported

Am I doing something wrong?
Sep 22 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Manzoorul Hassan | last post by:
Isn't there a simple way to add a dir to my PATH env? Seems like all the examples I've seen so far all in one way or another is parsing the current PATH and puts it all together, including the new...
4
by: Rob Richardson | last post by:
Greetings! I am trying to write a set of macros to generate Property code for private variables. With the cursor on a line that says "Private m_MyThing as Thing", I would run the macro and ...
1
by: Dave | last post by:
I have two environments: DEV and PROD. In DEV I have two independent webs. In PROD one of the webs is the root and the other is a subweb of the root. Each enviornment has a different file system...
0
by: SHHHH | last post by:
when i wrote this code in master page: <script type ="text/javascript" > function fnevar() { var npath="<%=SITEPATH%>"; return(npath); alert(npath); }
28
by: darren via AccessMonster.com | last post by:
Hi I've seen details on bypassing macro security with a bat file but has any one incorporated this with Tony Toews FE Updater? If so, I'd appreciate some guidance. As both open the database...
4
by: joemo2003 | last post by:
Is there a way to use VBA check to see the macro security setting? I want to use VBA check to see is the "Trust access to VB project" setting is on? Such as it return "True" when set to Trust access...
2
by: bart.hernalsteen | last post by:
Hi, I want to read the envorinment setting "path" and then on certain conditions change this setting. ex path : "%SystemRoot%\system32;%SystemRoot%;%SystemRoot% \System32\Wbem;C:\Program...
6
by: teja1234 | last post by:
Hi All, I am using absolute path in my macro code, but i want to change it to relative path. I am not sure what exactly relative path will do how to use relative path in macro. Please can any one...
1
by: teja1234 | last post by:
Hi All, I am using absolute path in my macro code, but i want to change it to relative path. I am not sure what exactly relative path will do how to use relative path in macro. Please can any one...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.