+ Reply to Thread
Results 1 to 4 of 4

Ambiguous name detected...but why?

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    Prague
    MS-Off Ver
    Excel 2007
    Posts
    2

    Ambiguous name detected...but why?

    Hallo, I am preparing a workbook with 3 worksheet. On each worksheet, there are 4 columns in use - column A and B are with text, that is locked and unchangable. Column C is for Currency and once the data are added, the cell locks and standard excel message about lock cell will appear. I programme it by this code and it works perfectly.
    Please Login or Register  to view this content.
    What Ive needed further for column D was a date, that will appear once there is a data entry in column C and is unchabgable either. I found this code:
    Please Login or Register  to view this content.
    which works well on a blank excell sheet, but those 2 codes doesnt work together. If I pass them to VBA like this:
    Please Login or Register  to view this content.
    and I enter a value in column C, message appear in VBA: "COMPILE ERROR! Ambiguous name detected: Worksheet_change."

    It is probably will be very minor think, but I have no clue what to do.

    Thank you for your help.
    Last edited by Paul; 10-30-2012 at 01:58 PM. Reason: Added CODE tags for new user. Please do so yourself in the future.

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,841

    Re: Ambiguous name detected...but why?

    You can't have two separate Worksheet_Change events - that is what is throwing the 'Ambiguous Name' error. However, you CAN combine the two into one routine.

  3. #3
    Registered User
    Join Date
    10-30-2012
    Location
    Prague
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Ambiguous name detected...but why?

    I see. I admit it is my first day of VBA :-), how can I put both codes together? Thank you.

  4. #4
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,841

    Re: Ambiguous name detected...but why?

    Since you're new to the forum, I'll give you some advice... Remember to wrap your code with the CODE tags (the # symbol in the formatting bar right above your post text). Just select the actual lines of code in your post, then click the # button and it will add the tags for you.

    But as for your issue, I would try this:
    Please Login or Register  to view this content.
    See how that works.

    - Moo

+ 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