+ Reply to Thread
Results 1 to 6 of 6

compile error ambiguous name detected worksheet_change

  1. #1
    Registered User
    Join Date
    07-22-2013
    Location
    Swansea, Wales
    MS-Off Ver
    Excel 2007
    Posts
    3

    compile error ambiguous name detected worksheet_change

    Hi All,

    First time query from myself. I am currently trying to use two Worksheet_Change subs in my code but keep getting an error saying "compile error ambiguous name detected". I know from reading previous threads that this is because I can not have two Worksheet_Change queries in one sheet. Would anybody be able to help me combine the following pieces of code please.

    If cell AJ13 shows “AA” I want to hide certain rows and if it shows “AB” I want it to hide others.

    The first change is...

    Please Login or Register  to view this content.
    And the second change is...

    Please Login or Register  to view this content.
    Any help you could provide would be much appreciated

    Thanks,
    Matt

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,385

    Re: compile error ambiguous name detected worksheet_change

    Maybe:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    07-22-2013
    Location
    Swansea, Wales
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: compile error ambiguous name detected worksheet_change

    Hi,

    This is perfect. Thank you very much. I have made a slight tweak as I have other variables where neither AA or AB will show and I need all unhidden. I just added another level, AC which has unhidden all.

    Thank you very much for you quick response and help with this.

    Cheers,
    Matt

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,385

    Re: compile error ambiguous name detected worksheet_change

    You're welcome.

    I'm glad you were able to adapt it to meet your needs.

    And my apologies ... I should have said "welcome to the forum"!



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    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


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  5. #5
    Registered User
    Join Date
    07-22-2013
    Location
    Swansea, Wales
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: compile error ambiguous name detected worksheet_change

    All done

    Thanks again.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,385

    Re: compile error ambiguous name detected worksheet_change

    Thanks ... and thanks for the rep

+ 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] compile error ambiguous name detected!?
    By Margate in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2013, 08:49 PM
  2. [SOLVED] Compile error: Ambiguous name detected: Worksheet_Change
    By ericwilder in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 01-30-2013, 12:49 PM
  3. [SOLVED] Compile Error: Ambiguous Name Detected: Workbook_BeforeClose
    By ltkay23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2012, 01:04 PM
  4. compile error: Ambiguous name detected :worksheet_change
    By ckz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2012, 12:41 PM
  5. Compile error: Ambiguous name detected
    By Aletha in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2008, 05:48 PM

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