1

I am learning vba class. just while i want to compile below simple code, it always shows a error message saying not correct implements interface. i am stucking at this point, someone can help on this? i tried office 2K10 64bit and 2k16 32bit and both version has some problem when setting implements class.


picture of error

    Option Explicit
    
    Implements cInterestType
    
    Private amount As Double
    
    Public Function cInterestType_CalculateInt() As Double
        ' <some code>
    
    End Function

Just for another test. i put a simple class code to returning a message, it still get the error, and seems it always stops and high light at "implements" when compiling. I used other computer to do the same code and it shows the same error message. error message

  • I would update the picture to have the correct return assignment shown i.e. with the prefix shown. Does the code work for other people but just not on your machine? Do we need see more of the code. – QHarr Jul 01 '20 at 12:34

1 Answers1

0

Your class module is also called cInterestType, and does not need to implement itself.

Ref:

JMP
  • 4,417
  • 17
  • 30
  • 41