+ Reply to Thread
Results 1 to 2 of 2

Referring to other workbooks

  1. #1
    jkitzy
    Guest

    Referring to other workbooks

    I have several (okay, about 500) different sheets to open, extract data, drop
    it into another workbook, and close.

    I've tried simply using references to the workbooks in the cells. Problem is

    a) takes WAY too long to update and
    b) those 500 files come out at about 31 per month - that is, in January,
    there are 31 files, February, another 31 files.

    I want to drop the data in each month to minimize the refresh time.

    BUT, the sheets (the data entry sheets) are very complex and have
    Workbook_Open and _Close and Sheet_Deactivate macros that I want to prevent
    from firing when the data is downloaded. Mostly just so I can speed things up.

    Any ideas?

    Thanks all.

  2. #2
    Dave Peterson
    Guest

    Re: Referring to other workbooks

    If you want to avoid running any events when you open another workbook, you can
    disable them:

    dim wkbk as workbook
    application.enableevents = false
    set wkbk = workbooks.open (filename:=xxxxx)
    'do the copy/paste/move/consolidate
    wkbk.close savechanges:=false
    application.enableevents = true
    'not sure when .enableevents = true should be turned on if you need it for
    'anything your code does




    jkitzy wrote:
    >
    > I have several (okay, about 500) different sheets to open, extract data, drop
    > it into another workbook, and close.
    >
    > I've tried simply using references to the workbooks in the cells. Problem is
    >
    > a) takes WAY too long to update and
    > b) those 500 files come out at about 31 per month - that is, in January,
    > there are 31 files, February, another 31 files.
    >
    > I want to drop the data in each month to minimize the refresh time.
    >
    > BUT, the sheets (the data entry sheets) are very complex and have
    > Workbook_Open and _Close and Sheet_Deactivate macros that I want to prevent
    > from firing when the data is downloaded. Mostly just so I can speed things up.
    >
    > Any ideas?
    >
    > Thanks all.


    --

    Dave Peterson

+ 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