vba compiling error: not correct implements interface

vba compiling error: not correct implements interface

我正在学习vbaclass。 就在我想编译下面的简单代码时,它总是显示一条错误消息,说不正确的实现接口。 我坚持在这一点上,有人可以帮忙吗? 我尝试了 office 2K10 64 位和 2k16 32 位,这两个版本在设置工具时都有一些问题 class.


picture of error

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

只是为了另一个测试。 我放了一个简单的 class 代码来返回一条消息,它仍然会出错,而且似乎它总是在编译时停止并在“实现”处突出显示。 我用其他计算机执行相同的代码,它显示相同的错误消息。 error message

您的 class 模块也称为 cInterestType,不需要自己实现。

参考: