title: Can VBA enumerate a COM object's methods or fields?
body: <p>I have a COM object (built with C#.NET) I'm using in VBA (Excel) and it would be really nice enumerate the COM object's fields and reference them automatically.  In .NET, this could be done with reflection.  Is there any way to do this in VBA?</p>
  
  <p>So, instead of</p>
  
  <pre><code>Dim x As MyCOMObject
  Set x = New MyCOMObject
  x.f1 = 1
  x.f2 = 2
  x.f3 = 3
  </code></pre>
  
  <p>Something more like:</p>
  
  <pre><code>Dim x As MyCOMObject
  Set x = New MyCOMObject
  For i = 0 to COMFieldCount(x) - 1
      SetCOMField(x, GetCOMFieldName(i), i+1)
  Next i
  </code></pre>