+ Reply to Thread
Results 1 to 5 of 5

Taking Too Much Time Vba Code

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Post Taking Too Much Time Vba Code

    hello, everyone

    This code is taking too much time, plz give the solution

    Please Login or Register  to view this content.
    thnx
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Taking Too Much Time Vba Code

    try this at top of code.

    Please Login or Register  to view this content.
    This at the end.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Taking Too Much Time Vba Code

    Try this

    Instead of looping through all the sheets, this selects them all together and applies the printing set-up in one hit.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Taking Too Much Time Vba Code

    thanx for repling

    but none method is working for me

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Taking Too Much Time Vba Code

    Excel holds page setup details separately for each sheet. So if you want to change lots of sheets from the default then it will take time.

    Suggestions

    1. Amend default settings:
    When Excel opens a new worksheet, it opens a default file and takes all its settings from there.
    If most of your files require the page set-up per the above macro, then amend and overwrite that file.
    (The file on my system is called Book1.xltx and is found in the XLstart folder)
    OR
    2. Automatically introduce correct settings when new sheet added
    Create a macro to add new sheet with your chosen settings and run the macro to create the sheet with correct settings in the first place

    eg
    Please Login or Register  to view this content.
    Last edited by kev_; 11-24-2016 at 05:00 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 07-14-2015, 02:12 PM
  2. efficiency recomendations, code taking long time to execute...
    By am_hawk in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2013, 03:55 PM
  3. Adding up Absent time taking lunch time into consideration
    By abrilabs in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-21-2013, 02:02 PM
  4. [SOLVED] Help taking a time from one field and outputting a time period in a different column
    By Hidden_Gecko in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-07-2013, 12:42 AM
  5. Macro taking a lot of time
    By anumolud in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2011, 07:25 AM
  6. Macro taking too long time to run
    By sharmanjali87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-02-2010, 07:08 AM
  7. [SOLVED] Click Event taking time
    By William Benson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2005, 04:05 PM

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