+ Reply to Thread
Results 1 to 3 of 3

Accessing a closed xls file from a macro

  1. #1
    Registered User
    Join Date
    06-27-2008
    Location
    Istanbul/Turkey
    Posts
    2

    Exclamation Accessing a closed xls file from a macro

    Hello,

    An Excel macro which contains a few lines similar to following one is working if the file is currently open :

    Please Login or Register  to view this content.
    A macro which contains a few lines similar to following one is supposed to work when the file is closed :

    Please Login or Register  to view this content.
    but it does not ! I tried all syntax probabilities

    Any suggestions ?

    Thanks
    Engin
    Last edited by dominicb; 06-27-2008 at 08:28 AM.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon Seapeace

    ...and welcome to the forum!!

    Importing data from a closed workbook doesn't work like that.
    One course of action is to turn off screen updating, open the workbook, copy the values to wherever, close the workbook and turn screenupdating back on.

    Alternatively, you can use ADO to drag the data from the workbook whilst it's still closed. Have a look here for techniques on this :

    http://www.erlandsendata.no/english/...dacimportwbado
    http://www.erlandsendata.no/english/...nvbadacwbdbado
    http://www.erlandsendata.no/english/...nvbadacwbdbdao

    Also, next time you post, please try and remember to use code tags to wrap your code (use the # button at the top) - I've done it for you this time.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    06-27-2008
    Location
    Istanbul/Turkey
    Posts
    2

    Thanks

    Hi Dominicb,

    Thank you for your kind quick answer. Things are clear now. I will also remember to use code tags in my next messages.

    Best regards
    Engin

+ 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