Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Relative import locations in macro


Hi,
How do I make the text import location of a file relative to the
location of the workbook?

My macro imports a text file 01.txt from the same location the workbook
is located:

With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Project\07 July\01.txt", Destination _
:=Range("C2"))

So that I can move the spreadsheet to other folders containing the same
named files and it still work?


--
rbmcclen
------------------------------------------------------------------------
rbmcclen's Profile: http://www.excelforum.com/member.php...o&userid=36367
View this thread: http://www.excelforum.com/showthread...hreadid=563437

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Relative import locations in macro


bump?

Someone surely knows if relative pathnames are possible in macros?


--
rbmcclen
------------------------------------------------------------------------
rbmcclen's Profile: http://www.excelforum.com/member.php...o&userid=36367
View this thread: http://www.excelforum.com/showthread...hreadid=563437

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro File Locations Lori-Wheaten Excel Discussion (Misc queries) 2 June 9th 08 05:56 PM
Are relative file locations possible in linking workbooks? Angyl Excel Discussion (Misc queries) 6 December 20th 07 03:22 AM
How to write macro that selects relative locations NewKid Excel Worksheet Functions 2 September 12th 06 07:41 PM
File locations becoming relative when workbook is emailed by macro Sam Excel Discussion (Misc queries) 1 September 4th 06 07:18 PM
Help Ofc Excel2003 macro locations Perico Excel Programming 0 May 16th 04 11:51 PM


All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"