+ Reply to Thread
Results 1 to 10 of 10

Ambiguous name detected error

  1. #1
    Registered User
    Join Date
    10-10-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Ambiguous name detected error

    Why do I have that error?


    Please Login or Register  to view this content.
    Last edited by jpxexcelforum; 09-10-2011 at 03:09 PM.

  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
    48,155

    Re: Ambiguous name detected error

    It's ambiguous because you have *two* "Private Sub Workbook_SheetChange" events.

    You need to combine the tests within one "Private Sub Workbook_SheetChange" event.

    Regards
    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
    10-10-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Ambiguous name detected error

    Quote Originally Posted by TMShucks View Post
    It's ambiguous because you have *two* "Private Sub Workbook_SheetChange" events.

    You need to combine the tests within one "Private Sub Workbook_SheetChange" event.

    Regards
    Can you show me how? I'm new to coding.

  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
    48,155

    Re: Ambiguous name detected error

    One way:

    Please Login or Register  to view this content.

    Regards

  5. #5
    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
    48,155

    Re: Ambiguous name detected error

    In actual fact, each section should be structured like:

    Please Login or Register  to view this content.

    This is because you are making changes to the sheet within the change event.


    Regards

  6. #6
    Registered User
    Join Date
    10-10-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Ambiguous name detected error

    Thanks. The first one didn't work though, I tried it. I tried the second one. Is this correct?

    Please Login or Register  to view this content.

  7. #7
    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
    48,155

    Re: Ambiguous name detected error

    In what way didn't it work?

    I would have expected it to work but it would have gone through the routine more times than it needed to.

    The second example looks OK ... but, if the first attempt failed, I don't see why this would be any more successful.

    Regards

  8. #8
    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
    48,155

    Re: Ambiguous name detected error

    This works as I would expect it to:

    Please Login or Register  to view this content.


    Regards

  9. #9
    Registered User
    Join Date
    10-10-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Ambiguous name detected error

    Works great! I saw where I made a mistake. I linked a cell to the same offset. This is exactly what I needed.

    Thanks a lot! Mods please consider this thread solved! Thanks again TMShucks!!

  10. #10
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,976

    Re: Ambiguous name detected error

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

    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
    Everyone who confuses correlation and causation ends up dead.

+ 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