title: Applying VBA Code on all sheets
body: <p>My VBA code sorts a sheet by a certain column, i.e. "AT". What I like to have is for this VBA to apply on all the sheets of the workbook at the same time. My original working code looks like this:</p>
  
  <pre><code>Dim sort As String
  Dim area As String
  area = "A4:FJ4100"
  sort = "AT"
  ActiveSheet.Range(area).Sort _
  Key1:=Range(sort &amp; "1"), Order1:=xlDescending, _
  Header:=xlGuess, MatchCase:=False, _
  Orientation:=xlTopToBottom
  Application.ScreenUpdating = False 
  </code></pre>
  
  <p>I tried adding</p>
  
  <pre><code>dim sh as Worksheet 
  For each sh in ActiveWorkbook.Worksheets 
  sh.activate 
  "my code"
  Next
  </code></pre>
  
  <p>but this does not work. Happy for any help!</p>