+ Reply to Thread
Results 1 to 3 of 3

VBA Speed up

  1. #1
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Question VBA Speed up

    Can anybody shed some light on how I make the following and lots more formula's like it run much faster or streamline the code.

    Windows("Materials Manager - old").Activate
    Sheets("Suppliers").Select
    Range("AC6:AV14").Select
    Selection.Copy
    Windows("Materials Manager.xls").Activate
    Sheets("Suppliers").Select
    Range("AC6:AV14").Select
    ActiveSheet.Paste

    The code is jumping between 2 excel files - one called Materials Manager.xls and another called Materials Manager - old.xls - both files are open at the same time then the code and lots more liek it copies different parts of the data from one version to the new version but runs slow??

  2. #2
    Bob Phillips
    Guest

    Re: VBA Speed up


    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

    Workbooks("Materials Manager -
    old").Worksheets("Suppliers").Range("AC6:AV14").Copy _
    Workbooks("Materials
    Manager.xls").Worksheets("Suppliers").Range("AC6:AV14")

    Application.Calculation = xlCalculationAutomatic
    Application.ScreenUpdating = True

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "sparx" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Can anybody shed some light on how I make the following and lots more
    > formula's like it run much faster or streamline the code.
    >
    > Windows("Materials Manager - old").Activate
    > Sheets("Suppliers").Select
    > Range("AC6:AV14").Select
    > Selection.Copy
    > Windows("Materials Manager.xls").Activate
    > Sheets("Suppliers").Select
    > Range("AC6:AV14").Select
    > ActiveSheet.Paste
    >
    > The code is jumping between 2 excel files - one called Materials
    > Manager.xls and another called Materials Manager - old.xls - both files
    > are open at the same time then the code and lots more liek it copies
    > different parts of the data from one version to the new version but
    > runs slow??
    >
    >
    > --
    > sparx
    > ------------------------------------------------------------------------
    > sparx's Profile:

    http://www.excelforum.com/member.php...o&userid=16787
    > View this thread: http://www.excelforum.com/showthread...hreadid=536705
    >




  3. #3
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Thumbs up VBA Speed Up

    Thanks for assisting - Excel file now transfers to new Excel file so much quicker than before. Thanks for helping.

+ 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