+ Reply to Thread
Results 1 to 2 of 2

ActiveSheet.QueryTables question

Hybrid View

  1. #1
    Registered User
    Join Date
    02-14-2013
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2010
    Posts
    55

    ActiveSheet.QueryTables question

    I have this code:

    PHP Code: 
    With ActiveSheet.QueryTables.Add(Connection:= _
            
    "TEXT;C:\Users\malbre1\Desktop\SilverlinkTest.csv"Destination:=Range("$A$1" _
            
    ))
            .
    Name "SilverlinkTest"
            
    .FieldNames True 
    instead of using the static file path I would like to use a file path I have as a variable which equals fileA. Do you know how to insert that into my code. I've tried to replace this: "TEXT;C:\Users\malbre1\Desktop\SilverlinkTest.csv" with fileA but that doesnt work. I'm assuming I also need to keep TEXT too.

    Any ideas?

  2. #2
    Registered User
    Join Date
    02-14-2013
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: ActiveSheet.QueryTables question

    I figured it out!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. ActiveSheet.QueryTables.Add - only add 2nd row
    By umbata in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-03-2013, 12:45 PM
  2. ActiveSheet.QueryTables.Add generalisation
    By ppg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-17-2009, 04:06 AM
  3. changing the name on ActiveSheet.QueryTables.Add
    By ppg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-16-2009, 06:38 AM
  4. ActiveSheet.QueryTables.Add
    By Rick in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-10-2005, 12:30 AM
  5. RE: ActiveSheet.QueryTables.Add
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-09-2005, 03:25 PM

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