title: Proper Case Selection in Excel
body: <p>I have some code that should convert my text to Proper Case but its not working.
  I start by marking the cells I want converted and then run this macro:</p>
  
  <pre><code>Sub ProperCase()
  
  Dim rng As Range, cell As Range
  
  Set rng = Selection
  
  For Each cell In rng
  
  Next cell
  
  cell.Value = WorksheetFunction.Proper(cell.Value)
  
  End Sub
  </code></pre>
  
  <p>But Excel gives me runtimer error 91</p>
  
  <p>Object variable or With block variable not set</p>