写了一个类:(类名:cls)
Option ExplicitPublic y As Integer
 
Private m As IntegerPrivate Property Get y() As Integer
y = m
End PropertyPrivate Property Let y(a As Integer)
m = a
End PropertyPublic Function ab() As Integer
MsgBox "msad"
End Function窗体代码:
Option Explicit
Public WithEvents clsm As clsPrivate Sub Form_Load()
Set clsm = New cls
clsm.ab
End Sub运行时出现两个错误:1,在类中"发现二义性的名称 y“
2.如果使用withevents变量时出现错误提示”对象不是源自动事件“。
敬请高手指教……