View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tetsuya Oguma
 
Posts: n/a
Default How to cycle through each of property and its value of Class?

Hi all,

I just wonder a way to go through all the properties and each value.

I have a Class called clsFund and in it:
++++
Dim m_szName As String
Dim m_szID As String

Property Let pName(szName As String)
m_szName = szName
End Property

Property Get pName() As String
pName = m_szName
End Property

Property Let pID(szID As String)
m_szID = szID
End Property

Property Get pID() As String
pID = m_szID
End Property
++++

Then I want a For Each... loop like method to invoke in order to cycle
through each property (pName and pID) and it's value!

Thanks for your time.
---
Tetsuya Oguma, Singapore