+ Reply to Thread
Results 1 to 8 of 8

Procedure too large

  1. #1
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Procedure too large

    Hi All

    is there a way to reduce this procedure? im getting an error message telling me it is too large, can I adapt the variables to accommodate copying the inputs into the next 52 rows? rather than writing the code as it is?

    Please Login or Register  to view this content.
    This is only part of the code, it is too long to post, and the workbook is 28,831kb so to big to attach as an example

  2. #2
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Procedure too large

    a bit more of the code......

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-03-2015
    Location
    IE
    MS-Off Ver
    2003 - 2016
    Posts
    258

    Re: Procedure too large

    Try some loops...

    Please Login or Register  to view this content.
    Should replace the last code block you posted, saving about 150 lines... But can't help think a bigger redesign is needed.
    Last edited by grimes0332; 01-18-2016 at 09:19 AM.

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Procedure too large

    Try this untested code
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  5. #5
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Procedure too large

    Hi

    Great thank you both, I managed to get it to work by using both of the suggestions, so now I have two codes that do the same thing, i had to keep the first part of the code where .value = 1,2,3,4,5,6,7,8,9,10,11,12, or 13, and the same with the 1,2,3,4 but all works perfectly now, thank you

  6. #6
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Procedure too large

    Hi I thought this was working but it seems to be stopping at row 50, and not doing the 52 weeks worth, even thought -1 to 50 is 52......

    Also once it has added one part in, it doesn't add onto the list so from cell, 58 onwards, most of it works ok, but something seems missing and I have tried moving things around and messing around with the figures just wondering if anyone has any suggestions?....

    This is what it is looking like as you can see it stops at row 50 but should go up to 57

    Image1.JPG

  7. #7
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Procedure too large

    I am using this code

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Procedure too large

    ignore that, I sussed it out I missed the loop

+ 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. Procedure too large
    By yikwei in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-31-2014, 07:49 AM
  2. [SOLVED] Procedure too large
    By gpsachs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-30-2013, 02:08 PM
  3. [SOLVED] Procedure too large
    By battenborrow in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-02-2013, 08:51 AM
  4. [SOLVED] VBA procedure too large
    By Spherous in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-13-2013, 03:34 AM
  5. Procedure too large
    By JonathonHardy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-27-2011, 01:34 PM
  6. Procedure too large
    By theresap in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-14-2010, 02:54 PM
  7. Procedure too large
    By dkinnz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-08-2007, 04:53 PM

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