不能只写一个空的属性过程。要这样 Private m_PID As StringPublic Property Let PID(NewValue As String) m_PID=NewValue 'Other Function End PropertyPublic Property Get PID() As String PID=m_PID 'Other Function End Property
我是用设计器添加的属性啊,有以下代码 '缺省属性值: Const m_def_PID = "0" '属性变量: Dim m_PID As String '注意!不要删除或修改下列被注释的行! 'MemberInfo=13,0,0,0 Public Property Get PID() As String PID = m_PID End PropertyPublic Property Let PID(ByVal New_PID As String) m_PID = New_PID PropertyChanged "PID" End Property
[email protected]
应该可以的啊,我也用过。
Private m_PID As StringPublic Property Let PID(NewValue As String)
m_PID=NewValue
'Other Function
End PropertyPublic Property Get PID() As String
PID=m_PID
'Other Function
End Property
'缺省属性值:
Const m_def_PID = "0"
'属性变量:
Dim m_PID As String '注意!不要删除或修改下列被注释的行!
'MemberInfo=13,0,0,0
Public Property Get PID() As String
PID = m_PID
End PropertyPublic Property Let PID(ByVal New_PID As String)
m_PID = New_PID
PropertyChanged "PID"
End Property