+ Reply to Thread
Results 1 to 15 of 15

Compile Error: Ambiguous name detected: Floor

  1. #1
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    180

    Compile Error: Ambiguous name detected: Floor

    attached is a file with the vba code

    The code module of interest: TestHouseObject
    class modules involved: House_Class, Floor_Class, Floor_CollectionClass

    The compile error(Ambiguous name detected:Floor)
    occurs in the House_Class in the code lines beginning with

    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because it's only a couple of lines. --6StringJazzer

    *****************************
    my expectations were that Floor is defined as of type, Floor_Class, in the Public Property Get Floor
    hence I could then use it thereafter.
    Attached Files Attached Files
    Last edited by 6StringJazzer; 02-27-2023 at 09:19 PM.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,642

    Re: Compile Error: Ambiguous name detected: Floor

    Hi there,

    Your code:

    Please Login or Register  to view this content.

    You have defined two identical properties - hence the "Ambiguous name detected" error message.


    Hope this helps.

    Regards,

    Greg M

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Compile Error: Ambiguous name detected: Floor

    You already have Get Floor declared on line 29
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    180

    Re: Compile Error: Ambiguous name detected: Floor

    Good Morning 6StringJazzer,
    Thank you for adding code tags.....BUT....I do not understand what code tags are!!!
    I will add them, for sure, when i learn what they are.

    I believe, but could be wrong, that i did add tags that associate my issue with key words. I might have forgotten them this time. Sorry about that. Is that what you mean by code tags?

  5. #5
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    180

    Re: Compile Error: Ambiguous name detected: Floor

    ah yes !!!! now i see.....I am so sorry....hate to waste your valuable time on such simple issues. Sorry....

  6. #6
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    180

    Re: Compile Error: Ambiguous name detected: Floor

    Thank you for your help, 6StringJazzer....
    how do you identify line numbers?
    can i set something up in my vba project manager?

    I did figure it out, thanks to you and Greg, but in the future it will greatly help me out if i can define the exact line of code by number when describing my problems.

    Thank you, again.
    bil

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Compile Error: Ambiguous name detected: Floor

    There are two ways to add code tags. One is to select the code part of the text so it is highlighted, then press the "#" button in the edit controls. The other is to simply type in the tags:

    [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]


    Why use code tags? Code tags:

    1. Are required by rules (see rule #2)
    2. Preserve spacing used to show code structure (otherwise leading spaces and repeated spaces are removed)
    3. Add scroll bars to navigate code with long lines or a lot of lines

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Compile Error: Ambiguous name detected: Floor

    Quote Originally Posted by whburling View Post
    how do you identify line numbers?
    can i set something up in my vba project manager?
    There is an indicator at the top of the page that shows the line number and character number where the cursor is.

    line number.jpg

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Compile Error: Ambiguous name detected: Floor

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking addreputationiconsmall.jpg below their name.

  10. #10
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    180

    Re: Compile Error: Ambiguous name detected: Floor

    Thank you, 6Stringer !!!
    i always wanted to know how you guys did that.....so i am already motivated....

    do i need the square brackets ? or can i type
    code
    ****code goes here****
    /code

  11. #11
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    180

    Re: Compile Error: Ambiguous name detected: Floor

    wow !!!!!!

    Thank you so much for that info.....never noticed it....

  12. #12
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    180

    Re: Compile Error: Ambiguous name detected: Floor

    Thank you 6Stringer....
    I did "add reputation for both you and Greg.....and i marked this thread as solved...
    Thank you for your education....
    bil

  13. #13
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Compile Error: Ambiguous name detected: Floor

    Quote Originally Posted by whburling View Post
    do i need the square brackets ? or can i type
    code
    ****code goes here****
    /code
    You have to do it exactly as my example.

  14. #14
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,642

    Re: Compile Error: Ambiguous name detected: Floor

    Hi again,

    Many thanks for your feedback and also for the Reputation increase - much appreciated!

    You're welcome - glad to see that things are working out for you.

    Best regards,

    Greg M

  15. #15
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    180

    Re: Compile Error: Ambiguous name detected: Floor

    Morning 6Stringer!!!!

    I want to place a question using your tagged code procedure.

    The question surfaces, how to gain access to the code? I am given the capability of loading an entire workbook. once loaded can i use it to extract code snippets (via tagging) while i am writing the question i want to pose? Please help regarding this matter as I DO want to make the job of helping easier.
    bil

+ 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. Compile
    By rexcel548562 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2022, 10:16 AM
  2. [SOLVED] Compile Error: Ambiguous name detected
    By trubio77 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-19-2017, 02:26 PM
  3. Compile Error : Ambiguous name detected
    By vasanthrs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2013, 09:58 AM
  4. [SOLVED] Compile error ambiguous name detected workbook_open
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-04-2013, 06:35 AM
  5. VBA Compile Error: Ambiguous name detected
    By kieranoduill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2013, 05:31 PM
  6. [SOLVED] compile error ambiguous name detected!?
    By Margate in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2013, 08:49 PM
  7. Compile error: Ambiguous name detected
    By Aletha in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2008, 05:48 PM

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