title: Multiple Objects In With Statement
body: <p>I'm wondering why this simple code throws a "Object Required" error when I attempt to run it. I can't really find any reason why VBA would have trouble andling this. It compiles OK, but fails to run.</p>
  
  <pre><code>Sub Test()
  
  Dim X, Y, Z As Range
  
  Set X = Sheets(1).Range("A1")
  Set Y = Sheets(2).Range("A1")
  Set Z = Sheets(3).Range("A1")
  
  
  With X And Y And Z
  .Value = "Test" 'FAILS HERE
  End With
  
  
  End Sub
  </code></pre>
  
  <p>Im sure its something small, or maybe VBA just can't handle this?</p>