Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paths when working with macros
Greetings,
I recently recorded a macro that I use to import data from the sam directory that my spreadsheet resides in. After recording, the macr gives the full path to the spreadsheet and the Microsoft Acces database that I am using (i.e. C:\Stuff\Morestuff\myspreadsheet.xls). This prevents me from simply moving the files to another computer t use, since the other computer may not be running the import in the sam location on the hard drive. How do I tell the spreadsheet not go to a specific directory and jus look for the files it needs in the same directory that the origina spreadsheet resides? Thanks -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paths when working with macros
Leave out the path, just use the workbook name. Excel automaticall
looks in the local folder first (unless you have changed i subsequently by navigating to another folder via File/Open o whatever). :- myspreadsheet.xl -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paths when working with macros
merlin63 wrote ...
How do I tell the spreadsheet not go to a specific directory and just look for the files it needs in the same directory that the original spreadsheet resides? Use: ThisWorkbook.Path Jamie. -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007/macros not working | Excel Worksheet Functions | |||
Macros not working when file run on a Mac | Excel Discussion (Misc queries) | |||
Paths for macros | Excel Discussion (Misc queries) | |||
Working with Macros - Help needed!!! | Excel Discussion (Misc queries) | |||
Advise, please, how to get the following macros working: | Excel Programming |