title: VBA Excel Printing data into Immediate Window about a range data to test understanding
body: <p>I am wanting to do a series of small tests that helps builds my understand as I work around a small business problem of generating data in the correct manner.</p>
  
  <p>My first approach is to prove for myself that I could Print (string data type) a list of ID's (using the .value method) in the Immediate window of the VBE so I can see the list which I can then build up another test afterwards.</p>
  
  <p>My VBA code at the moment shows this which I define "CustTest" as a named Range from A1:A100 in Sheet 1</p>
  
  <pre><code>Sub TestRanges()
  
  Dim Custrng As Range
  
  For Each Custrng In Range("CustTest")
      Print Custrng.Value
  Next
  End Sub
  </code></pre>
  
  <p>I also thought of this</p>
  
  <pre><code>Sub TestRanges()
  
  Dim Custrng As Range
  
  For Each Custrng In Range("CustTest")
      With Custrng
         Print  .Value
      End With
  Next
  End Sub
  </code></pre>
  
  <p>This came up with an error I am not sure what has occured, Compile Error:-  Method not valid without suitable object.</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks,
  Peter.</p>