title: accessing .name.name attribute of excel cell while iterating over usedrange
body: <p>I'm trying to iterate over the used range in a worksheet and match the given .name.name attribute to a cStringBuilder for future use in a web application.</p>
  
  <p>But I'm running into errors with the append function and using the .name.name attribute of a cell.</p>
  
  <p>If I use something like <code>Worksheets("MAIN").Range("F2").name.name</code> I extract the correct information. But it doesn't work will the for loop.</p>
  
  <p>If I use <code>cell.name</code>it does however extract the correct cell values. But I have to match a .name.name attribute as I can't be sure on exactly where in the sheet the data is presented always.</p>
  
  <p>The error message I'm getting is: <code>Run-time error '1004': Application-defined or object-defined error</code></p>
  
  <p>Here's my coding that I'm trying to make work.</p>
  
  <pre><code>Public Function Testing() As cStringBuilder
  
  Dim strJson As cStringBuilder
  Set strJson = New cStringBuilder
  
  For Each cell In Worksheets("MAIN").UsedRange
      If cell.Value &lt;&gt; "" Then
          strJson.Append (cell.name.name)
      End If
  Next
  Testing = strJson
  End Function
  </code></pre>