+ Reply to Thread
Results 1 to 2 of 2

Procedure too Large !!!

  1. #1
    Registered User
    Join Date
    06-07-2006
    Posts
    58

    Procedure too Large !!!

    Hi all,

    The VB code of one of my UserForm is excedding 64K, so when I compile the code, I get the error message "PROCEDURE TOO LARGE".

    Anyone know you to break my 'Big' macro in few 'Small' macros ???

    for exemple, a click on a Button will run the code, stored in a module or something like that.


    Thanks in advance
    Herve

  2. #2
    Registered User
    Join Date
    07-31-2007
    Posts
    5
    You probably need to manually break the code up.

    I would think you would go into the Excel menu (tools-Macro-visual basic editor) and open VB.

    Once there, locate your macro (probably in the Modules section). Then create a new Sub/End Sub section (named whatever makes sense). Then, in the original sub, pick a point in the part of your code and cut/paste it into the new sub. Then, back in the original sub, put a call to the new sub from the point you cut the code.

    Here is a link to an article which explains the code size limitations for modules and such:

    http://msdn2.microsoft.com/en-us/lib...19(VS.60).aspx

    Good luck... Kim

+ 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