+ Reply to Thread
Results 1 to 3 of 3

Compile Error within class

  1. #1
    Registered User
    Join Date
    02-16-2013
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    24

    Compile Error within class

    I've just introduced my first class into a workbook and I'm running into a number of errors. This is my first time doing something like this and I suspect there are a number of issuess across my architecture, any recommendations are appreciated.

    My most recent issues is within the class itself. I'm getting the following error:

    Compile Error:

    Definitions of property procedures for the same property are inconsistent, or property procedure has an optional parameter, a ParamArray, or an invalid Set final parameter


    The debugger indicates the issues comes from the final SplitPercent code I've emboldened below. Below the initial code, I have also included the main Sub using this class, as well as the InputBox that generates the initial value from user input.

    Class Module:
    Please Login or Register  to view this content.
    Primary Macro:
    Please Login or Register  to view this content.
    InputBox Function for SplitPercent:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by dystopianprotagonist; 02-25-2013 at 02:25 PM. Reason: Thanks Leif!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Compile Error within class

    Hello dystopianprotagonis,

    Your problems lie with the Get Property syntax. Since your property has only a single argument value, you need not include it in the parentheses.

    Here is what you have...
    Please Login or Register  to view this content.
    Here is how it should be written...
    Please Login or Register  to view this content.
    Here is the correct code...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-16-2013
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Compile Error within class

    Leith, thanks so much for your source code corrections. Such a minor slip, but it made all the difference!

    I'm hugely thrilled to say that this is up and running, and written from scratch!

+ 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