+ Reply to Thread
Results 1 to 4 of 4

Multiple worksheet change events error

  1. #1
    Registered User
    Join Date
    10-21-2019
    Location
    Paris
    MS-Off Ver
    2016
    Posts
    2

    Multiple worksheet change events error

    Hi All,

    I'm having trouble to combining 10+ change events. I'm very new to VBA and I'm not able to find a solution.

    What I'm trying to do is if user enters a value more than 2 for a question then he is been given option to answer to sub questions which are directly below. So there are 10 such questions with each question having 4 sub-questions which are shown or hidden based on the user input(i.e value in cell >2 or not)

    Please find below the code:

    Please Login or Register  to view this content.

    And so on till 10 criterias



    When I run it I get an error " Ambiguous name:Worksheet_Change".


    Please help me with this dilemma.
    Last edited by tommy95; 10-22-2019 at 09:49 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Multiple worksheet change events error

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Multiple worksheet change events error

    Ok.

    You can only have one change event per worksheet.

    The trick is to use the one event efficiently.

    I will demonstrate:


    Please Login or Register  to view this content.

    To see how this work

    Open your Macro

    Click on the Grey Bar on the left hand side of a macro line. prefferable:

    Please Login or Register  to view this content.
    A Brown Circle will appear and the line will be highlighted in Brown. You have inserted a break point and your macro will stop at that point.

    You can step through the macro line by line by pressing f8 or you can resume the macro by pressing f5.

    The beauty is while your macro is stooped you can click on view in the VBA mobule and then local window.

    This will allow you to see all your variables and arrays and their contents.

    With a bit of investigation you will see why I am using Pos -1 in the line
    Please Login or Register  to view this content.
    Last edited by mehmetcik; 10-21-2019 at 05:32 PM.

  4. #4
    Registered User
    Join Date
    10-21-2019
    Location
    Paris
    MS-Off Ver
    2016
    Posts
    2

    Re: Multiple worksheet change events error

    Hey,

    Thanks for all the help.

    I just modified one code

    Please Login or Register  to view this content.
    To

    Please Login or Register  to view this content.
    Cause I wasn't able to enter data anywhere on the same sheet.

    Thanks once again for the help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA help - multiple worksheet change events
    By tbear1997 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-08-2016, 03:51 PM
  2. VBA Multiple Worksheet Change Events
    By Zimbo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-24-2013, 10:58 AM
  3. Multiple Worksheet Change Events
    By justinharris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2011, 06:11 PM
  4. Multiple Worksheet Change Events
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 12-13-2010, 06:14 PM
  5. Worksheet Multiple Change Events
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-24-2010, 02:02 AM
  6. Multiple change events in one worksheet?
    By JBW in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-22-2009, 01:33 AM
  7. Multiple Worksheet Change Events???
    By Potoroo in forum Excel General
    Replies: 3
    Last Post: 11-28-2006, 12:59 AM

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