+ Reply to Thread
Results 1 to 5 of 5

Can you write a loop for Worksheet change event?

  1. #1
    Registered User
    Join Date
    07-31-2012
    Location
    seattle,Washington
    MS-Off Ver
    Excel 2010
    Posts
    4

    Can you write a loop for Worksheet change event?

    I have an if statement that is too long in the worksheet change event (Compile Error: Procedure too large). I wrote it all out instead of looping or calling outside procedures
    Question1 : Is it possible to write a loop to check the target cell based on cell name?
    Question 2: I broke up the code into section (0-5) but when i call the outside procedure using "If Target =" the target function doesnt seem to work unless its in the Worksheet module
    This survey has 95 questions and each question has an answer field, score field, and must signal a sync if any data in that question is changed.
    Here are the first 9 questions
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Can you write a loop for Worksheet change event?

    I would do it something like
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Can you write a loop for Worksheet change event?

    sorry like
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Can you write a loop for Worksheet change event?

    Last one, did it without being in excel.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-31-2012
    Location
    seattle,Washington
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Can you write a loop for Worksheet change event?

    ah cool thanks! i knew there was an easier way! just posting the final code as there was still one mispelling
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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