title: unable to reset used range
body: <p>I was trying to add an automatic macro to my very large workbook to at least trim some fat off by resetting the used range.
  I've tried numerous codes and cannot get it to work and can't figure out why.
  (It seemed to work a few time when I would manually delete every column to the right and bottom, then run the macro)
  I've tried the short <code>ActiveSheet.UsedRange</code></p>
  
  <p><code>Dim sht As Workshet 
   Dim lng As Long
      For Each sht In ActiveWorkbook.Worksheets
          lng = sht.UsedRange.Rows.Count
  Next</code></p>
  
  <hr>
  
  <p><code>Dim x As Long
  Dim y As Long
  x = ActiveSheet.UsedRange.Rows.Count
  y = ActiveSheet.UsedRange.Columns.Count</code></p>
  
  <p>and a few other suggestions but it brings me some 30k cells below my data table each time. </p>
  
  <p>Anyone know of simple surefire way of doing this? suggestions greatly appreciated as always, this WB is sitting around 70mb!</p>
  
  <p><strong>update</strong> Because I have tried numerous scripts to reset the used range without success unless I manually delete rows and columns, I have decided instead of trimming the use range to the last active row, I will simply delete the entire data table when the user saves (this has reduced the file size from about 70mb to 20mb!).</p>
  
  <p><strong>Many thanks</strong></p>