+ Reply to Thread
Results 1 to 6 of 6

compile error : definitions of property procedures for the same property are inconsistent

Hybrid View

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

    compile error : definitions of property procedures for the same property are inconsistent

    I can't see any inconsistencies.
    please see the attached workbook.
    The error is in the code defining the Room Class
    proper
    Attached Files Attached Files

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

    Re: compile error : definitions of property procedures for the same property are inconsist

    You cannot use Set for a scalar value or array. You use Set for objects and Let for scalar values and arrays. Change Set to Let.
    Public Property Let RoomName(GName As String)
        Let GName = Name
    End Property
    
    Public Property Let RoomID(GID As Integer)
        Let GID = ID
    End Property
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

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

    Re: compile error : definitions of property procedures for the same property are inconsist

    Thank you very much for your help. Is there a way for me to hear your music?

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

    Re: compile error : definitions of property procedures for the same property are inconsist

    Quote Originally Posted by whburling View Post
    Thank you very much for your help. Is there a way for me to hear your music?
    http://stringtheoryjazz.com/photovideo.php

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

    Re: compile error : definitions of property procedures for the same property are inconsist

    please help me understand a confusion that i have had for some time.

    topic: "get"

    i am trying to think of whether "get" is from the object's internal point of view or the object user's point of view.
    I have been visualizing that "Get" is used to provide an object user with a value from an object.
    Hence the user "gets" a property from an object.

    if an object user wants to give an object a value for a property, I have imagined the object user tells the object
    to "set" or "let" the value for a property.

    is my understanding correct?

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

    Re: compile error : definitions of property procedures for the same property are inconsist

    Quote Originally Posted by whburling View Post
    I have been visualizing that "Get" is used to provide an object user with a value from an object.
    Hence the user "gets" a property from an object.

    if an object user wants to give an object a value for a property, I have imagined the object user tells the object
    to "set" or "let" the value for a property.

    is my understanding correct?
    Your understanding is 100% correct.

+ 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. Excel VBA Classes - Property LET compile error
    By ironfelix717 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-27-2019, 07:37 AM
  2. [SOLVED] Property Let with multiple Args: "Definitions of property procedures inconsistent..."
    By excelicus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-19-2018, 03:35 PM
  3. [SOLVED] Can't Assign to Read-Only Property; Compile Error on Assigning Property to Class.
    By Dal123 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-15-2018, 08:09 AM
  4. [SOLVED] Compile error: Invalid use of property
    By Phil Hageman in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-04-2015, 06:03 AM
  5. Excel - VBA - Compile error: invalid use of property
    By Ladynerd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-20-2012, 11:22 AM
  6. Compile error: Expected Sub, Function, or Property
    By Cloudfall in forum Excel General
    Replies: 3
    Last Post: 08-30-2005, 01:05 AM
  7. Compile Error: Expected End Property
    By George J in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2005, 11:05 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