+ Reply to Thread
Results 1 to 5 of 5

Procedure too large

  1. #1
    Registered User
    Join Date
    10-10-2011
    Location
    St Louis, MO
    MS-Off Ver
    Excel 2010
    Posts
    13

    Procedure too large

    Would anyone be able to take a look at the attached file and see if I could streamline the code?

    I am getting a "Compile Error" that the procedure is too large.

    Essentially, what I would like the file to do is based on the dropdown selections, only show that particular month/week/day.

    Thanks in advance for any assistance.
    Attached Files Attached Files
    Last edited by JonathonHardy; 10-27-2011 at 02:18 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Procedure too large

    You could replace the first 167 lines of your code with this:

    Please Login or Register  to view this content.
    More generally, though, you could add some columns to the right and use AutoFilter -- much faster and much simpler.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Procedure too large

    Hi,

    I really dont get the build, whats it for?

    First thing i noticed with your code is, your doing the same thing over and over.

    Build this into a function

    Create first a function that hides the select cells on the user input in the first dropdownmenu.

    Next create a function that does the case.

    The cells that needs to be hidden/visible are at regular intervals, large intervals, but nontheless intervals. So they could be set in a function.

    You could build one function or 3 different, one for months, one for weeks and one for days.

    Steffen Thomsen

  4. #4
    Registered User
    Join Date
    10-10-2011
    Location
    St Louis, MO
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Procedure too large

    Thank you for the suggestions. I've streamlined it enough to work.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Procedure too large

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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