Property proceedure Compile error: property are inconsistemt

Property proceedure Compile error: property are inconsistemt

我在 VB6 中创建了一个 属性 来获取和设置 ErrorMessages 但每次我尝试 运行 它都会给我一个错误

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

Dim sErrorMessage As String
Public Property Get ErrorMessage() As String
    '<EhHeader>
    On Error GoTo PROC_ERR
    '</EhHeader>

100     ErrorMessage = sErrorMessage
102     sErrorMessage = ""
104     bMethodFailed = False

'<EhFooter>
PROC_EXIT:
    Exit Property
PROC_ERR:
    If modErr.iHandleError(Err, Erl(), "cTag.ErrorMessage") = vbRetry    Then Resume
    Resume Next
'</EhFooter>
End Property

Public Property Set ErrorMessage(ByVal value As String)
   Set sErrorMessage = value
End Property

尝试从 Set 更改为 Let:

Public Property Let ErrorMessage(ByVal value As String)
    sErrorMessage = value
End Property