+ Reply to Thread
Results 1 to 7 of 7

Procedure too large

  1. #1
    Registered User
    Join Date
    07-08-2010
    Location
    Illinois
    MS-Off Ver
    excel 2007 and 2003
    Posts
    11

    Procedure too large

    I have tried various methods to accomplish this. This procedure works, unfortunately when I copy it for the remaining 27 worksheets I get the error Compile error : Procedure too large.
    Can you help me make this smaller.

    Please Login or Register  to view this content.
    Thank you!
    Last edited by theresap; 07-14-2010 at 01:43 PM. Reason: solved

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Procedure too large

    to do the same thing in 1 line:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-08-2010
    Location
    Illinois
    MS-Off Ver
    excel 2007 and 2003
    Posts
    11

    Re: Procedure too large

    I replaced my code with yours and get
    run-time error '13": Type mismatch

  4. #4
    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

    You don't need the code in every sheet,place it in a Standard Module. I've started editing it to make it more efficient,you can continue
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste
    To run the Excel VBA code:

    Choose Tools | Macro | Macros
    Select a macro in the list, and click the Run button
    Hope that helps.

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

    Free DataBaseForm example

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Procedure too large

    From this distance I can't see what's in you sheet.
    You didn't even provide an example file.
    Solving errors is a local activity that can only be done in an existing (not an imaginary) sheet.

  6. #6
    Registered User
    Join Date
    07-08-2010
    Location
    Illinois
    MS-Off Ver
    excel 2007 and 2003
    Posts
    11

    Re: Procedure too large

    Thank you RoyUK. It worked perfectly. Down to 44k.

  7. #7
    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

+ 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