title: Automatic Text Capitalization Excel VBA
body: <p>I'm currently trying to write a macro based on sheet change, where the letters in a table column are automatically converted to upper case.  So, for example, if I entered "abcde-12345-678" into a cell, it would automatically correct to "ABCDE-12345-678".  After doing some digging, I found some code that has worked for some people, but I'm having trouble tweaking it to suit my needs.</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
      If Intersect(Target, Range("E:E")) Is Nothing Then Exit Sub
      Application.EnableEvents = False
      Target = UCase(Target)
      Application.EnableEvents = True
  End Sub
  </code></pre>
  
  <p>There are two things that I would like to address.  The first being, that this code isn't currently working for me.  I have it in the correct location according to the author (located in the Sheet1 object).  Are there any ideas as to why this isn't working?</p>
  
  <p>The second is that I would like to modify the code to refer to a table column rather than a range.  For example, I've tried changing the second line of the above code to the following (the name of my table is ReviewTracker, and the column I'm interested in is Product Number):</p>
  
  <pre><code>If Intersect(Target, Range(ReviewTracker[[@Headers],[Product Number]])) Is Nothing Then Exit Sub
  </code></pre>
  
  <p>This returned a compile error "Expected: list separator or )".  So there is obviously something wrong with it, but hopefully it might help illustrate what it is I'm trying to accomplish.</p>
  
  <p>Thanks in advance for any help on the issue.</p>
  
  <p>-Sean</p>