+ Reply to Thread
Results 1 to 4 of 4

Procedure Too Large

  1. #1
    Registered User
    Join Date
    01-25-2019
    Location
    Sedro-Woolley, Washington
    MS-Off Ver
    Office 365 Current Edition
    Posts
    29

    Procedure Too Large

    So I work at a hotel and have written a relatively simple spreadsheet for assigning rooms to housekeeping (our software has a terrible interface for it).

    Anyway, the spreadsheet was working perfectly until we hired an additional housekeeper and I had to add additional code to include her. Problem is that now I'm getting a "Procedure Too Large" error. And it makes perfect sense. I definitely programmed this the LONG way, but I'm still trying to learn the more advanced code that would probably solve this issue.

    Anyway, hopefully someone can give me some pointers on what to do!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-14-2020
    Location
    Mauritius
    MS-Off Ver
    Office 365
    Posts
    97

    Re: Procedure Too Large

    Hello,

    replace your long code where you write the whole code for each room with following which is using an For loop. You can do it like this since the line numbers are continuously.
    Try to use variables.
    Please Login or Register  to view this content.
    Greetings

    Tor


  3. #3
    Registered User
    Join Date
    01-25-2019
    Location
    Sedro-Woolley, Washington
    MS-Off Ver
    Office 365 Current Edition
    Posts
    29

    Re: Procedure Too Large

    This is fantastic! Thanks a ton!

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,305

    Re: Procedure Too Large

    I put this to one side as a rainy day challenge as it was a OMG moment when I saw all that hard coded naming.
    If you look at the attached file I have not named the captions of any of the option buttons.
    To save you the arduos task of naming 200 option buttons and their relevant coding I have used a naming sequence that will enable you in future to do this with one entry.
    All the option buttons follow a i.d. sequence (opt_100_1) where the '100' is the room number and the '1' is the column of the housekeeper header in Sheet3(Sheet1).
    If housekeepers change all you have to do is change the header name and ensure the individuals sheet tab is spelled the same (case sensitive).
    The only other alteration made was to the 'Unassigned' sheet, now named 'N_A' to align with the 'header' and 'option button' caption.
    Not able to use '/' in tab naming as it is a reserved character.
    Any questions just ask on this site.
    torachan.
    Attached Files Attached Files

+ 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. [SOLVED] VBA procedure too large
    By Solvax in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-29-2020, 03:35 PM
  2. [SOLVED] Procedure too large
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-22-2017, 12:06 PM
  3. VBA - Procedure too large.
    By northlondonpirate in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2016, 04:46 AM
  4. [SOLVED] Procedure too large
    By shiftyspina in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-19-2016, 10:38 AM
  5. procedure too large
    By mrjackg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-02-2014, 07:42 PM
  6. [SOLVED] VBA procedure too large
    By Spherous in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-13-2013, 03:34 AM
  7. procedure too large
    By ashkan_m_m2003 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2011, 04:12 AM

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