Private m_Messages() As String
Private m_NumMessages As Integer
Public Property Let Message(ByVal index As Integer, ByVal _
new_message As String)
If index < 1 Then
Err.Raise 380, "LabelList.Caption", _
"Caption index must be greater than zero."
End If
' Make room if necessary.
If index > m_NumMessages Then
m_NumMessages = index
ReDim Preserve m_Messages(1 To m_NumMessages)
End If
m_Messages(index) = new_message
End Property
Public Property Get Message(ByVal index As Integer) As _
String
If index < 0 Or index > m_NumMessages Then
Err.Raise 380, "LabelList.Caption", _
"Caption index must be between zero and " & _
m_NumMessages & "."
End If
Message = m_Messages(index)
End Property
|