+ Reply to Thread
Results 1 to 3 of 3

Error 1004 'cannot access file'

  1. #1
    Registered User
    Join Date
    09-29-2004
    Posts
    17

    Error 1004 'cannot access file'

    I am working on a project that involves the following steps:

    1. Open Workbook1.
    2. Capture Oracle data into a Sheet ("Data") in a new workbook, Workbook2. I use ADO. This is working.
    3. Match the new sheet, "Data", with an existing sheet in Workbook1 ("Categories") and output the merged data into a new sheet in Workbook2. I use JET to accomplish reading Sheet ("Data"). I come up with error 1004 'cannot access file ..../xls'.

    I started out just using 1 workbook, but then it always tried opening another instance of Workbook1 when it encountered the Jet connection Open command. Any ideas how I would best accomplish merging data from 2 different connections.
    Thanks

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Ingineu,

    ADO can only work with one connection at a time, hence your error. I am not sure why in your case, you need 2 connections. You will have to close one connection before you open the other.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    09-29-2004
    Posts
    17
    I do close the first connection before opening the second one. I Found a way to get around the issue ... just before I open the new connection, I save Workbook2.

+ 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