+ Reply to Thread
Results 1 to 2 of 2

Importing data through macro requires macro to be run twice.

  1. #1
    Registered User
    Join Date
    03-28-2011
    Location
    Oxford
    MS-Off Ver
    Excel 2003
    Posts
    2

    Importing data through macro requires macro to be run twice.

    Hello,

    I have an excel file on Sharepoint that I use a macro in to import data from other Sharepoint Excel files (these are calculated values in the input excel file rather than hard-coded values), and then this data feeds into pivot tables in the output file. What I find is if I run the macro once I get "#ref" for the imported data on the output file and it seems to have copied it but not calculated it. When I run it a second time it works. If I run the macro once but with VBA open, it also works.

    Note this is similar issue to a couple of other threads I've seen but I can't get the maco to work using excel import data (and therefore can't remove the tick from the enable background refresh). I think this is due to the use of Sharepoint and the file paths/names being specified in the file rather than the macro.


    Do you know how to make it work without a) running the macro twice and b) using the excel import data function?

    In addition, a possibly related issue is that if I change my input data, my output file does not pick up the new data when I re-run the macro. It only picks it up when I close the output file and reopen it.

    Macro is as follows (please excuse any poor coding... I'm self taught):


    Please Login or Register  to view this content.
    Last edited by pike; 03-29-2011 at 12:45 AM. Reason: Add code tags for newbie pm rule

  2. #2
    Registered User
    Join Date
    03-28-2011
    Location
    Oxford
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Importing data through macro requires macro to be run twice.

    Can anyone help with my query please? Do you need any more information? Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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