+ Reply to Thread
Results 1 to 3 of 3

VBA Multiple Process Splits

  1. #1
    Registered User
    Join Date
    07-13-2011
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    11

    VBA Multiple Process Splits

    I am working on a large project and I keep running into this issue.

    COMPILE ERROR: Procedure too Large.

    I have avoided this by writing around 1000 lines under
    Private Sub Userform_Initialize()

    then after another 1000
    Private Sub Userform_Activate()

    but I need more space under the same userform.

    I need the function to run when the userform opens and I want to know if I can split the process more than twice in a single userform?
    Last edited by imav; 07-21-2011 at 01:34 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: VBA Multiple Process Splits

    I don't really want to know or even see it, but why do you need to run 2000+ lines of code when you open a user form? Does your userform really need to be that complex? Or are you using very inefficient code?

    I'm not saying I can re-write your code, but it seems like an awful lot.

  3. #3
    Registered User
    Join Date
    07-13-2011
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VBA Multiple Process Splits

    The project is using 4 layers of combo boxes to sort and display different information upon a conditional request.

    there are well over 200 entries per combo box. I would LOVE to have someone tell me there is a more efficient way to do this. Below is a chunk of code that the comboboxes use.
    Please Login or Register  to view this content.
    Last edited by Paul; 07-13-2011 at 02:54 PM. Reason: Added code tags for new user. Please do so yourself in the future.

+ 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