+ Reply to Thread
Results 1 to 3 of 3

Importing Data Via Macro

  1. #1
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Importing Data Via Macro

    I have the following code that I cobbled together from various recordings of data imports and queries. Can someone help me with the syntax? The problem seems to be in my WHERE statment. I get a "Run-time error '1004': Data type mismatch in criteria expression."

    Please Login or Register  to view this content.
    ** Edit**
    Wow. I change the path of the source to ActiveWorkBook.Path instead of a fixed path, and it asks me to "Please enter MS Jet OLE DB Initialization Information".
    Last edited by Whizbang; 12-04-2009 at 12:44 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Importing Data Via Macro

    You might try

    Please Login or Register  to view this content.
    I was also a little suprised to see 'Date Call Placed' with spaces and not underscores?
    Martin

  3. #3
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Importing Data Via Macro

    The 'Date Call Placed' is in single quotes, so no underscores needed.

    I figured out the where statement (I think. This project was a while ago.). I needed to format the ranges as yyyy-mm-dd hh:mm:ss.

    Please Login or Register  to view this content.
    P.S. I would mark this thread as solved, but I can't seem to edit the original post. Probably because it is so old.

+ 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