+ Reply to Thread
Results 1 to 5 of 5

Thread: Import Help

  1. #1
    Registered User
    Join Date
    06-30-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Question Import Help



    help!

    I just found this site and thank god I did. I don't know what is happening with my programming but it's not doing what I want.

    When I run the code below it runs fine, except all the import data is added, except with all the previously cleared data. So instead of ending up with this:
    |One table of data|

    i get this:

    |Newest table of data|Info from before that||table from iteration before that|
    This continues all the way to the first time I imported information.

    Can someone look at my code and tell me why I'm stupid as hell?

    Thanks in advance for a solution that will make me look disabled.
    Sub SetAssays()
    Sheets("ASSAYS").Select
        With Sheets("ASSAYS").QueryTables.Add(Connection:= _
            "TEXT;" & ThisWorkbook.Path & "\Assays.CSV", Destination _
            :=Range("$A$1"))
            .Name = "Assays"
            .FieldNames = True
            .RowNumbers = False
            .FillAdjacentFormulas = False
            .PreserveFormatting = True
            .RefreshOnFileOpen = False
            .RefreshStyle = xlInsertDeleteCells
            .SavePassword = False
            .SaveData = True
            .AdjustColumnWidth = True
            .RefreshPeriod = 0
            .TextFilePromptOnRefresh = False
            .TextFilePlatform = 850
            .TextFileStartRow = 1
            .TextFileParseType = xlDelimited
            .TextFileTextQualifier = xlTextQualifierDoubleQuote
            .TextFileConsecutiveDelimiter = False
            .TextFileTabDelimiter = True
            .TextFileSemicolonDelimiter = False
            .TextFileCommaDelimiter = True
            .TextFileSpaceDelimiter = False
            .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
            1, 1, 1, 1, 1, 1, 1, 1, 1)
            .TextFileTrailingMinusNumbers = True
            .Refresh BackgroundQuery:=False
        End With
        Call RefreshQueryTables
    End Sub
    Last edited by jtaz; 07-01-2011 at 10:14 AM. Reason: Added Code tags

  2. #2
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: Import Help

    I think you need to look at your subject title and location (Hell?), your get better help them

  3. #3
    Registered User
    Join Date
    06-30-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Import Help

    What's wrong with the title name? Is it not descriptive enough?

    The location thing was just being trying to be funny while in a rush. Is that really such a big deal, people won't help me?

  4. #4
    Extremely Helpful member
    Join Date
    12-23-2006
    Location
    Belgium
    MS-Off Ver
    XL2003
    Posts
    6,127

    Re: Import Help

    The location can be important when the question/answer involves the poster's regional settings.
    If you really like to be funny, we have a "Water Cooler" forum where you can share your humor with everybody.

    As for the title, how better the description of your problem, how faster an answer can be given.
    Quoting entire posts clutters the forum and makes threads hard to read !

    If you are pleased with a member's answer then use the Star icon to rate it

    Click here to see forum rules

  5. #5
    Registered User
    Join Date
    06-30-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Import Help

    Thanks, I'll make the appropriate changes.

    Either way I solved the problem myself, thanks for you guys' responses anyway!

+ 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.2.0