+ Reply to Thread
Results 1 to 2 of 2

Relative import locations in macro

  1. #1
    Registered User
    Join Date
    07-14-2006
    Posts
    15

    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?

  2. #2
    Registered User
    Join Date
    07-14-2006
    Posts
    15
    bump?

    Someone surely knows if relative pathnames are possible in macros?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1