title: Select shapes within a range and align them
body: <p>I want to write a function where I can select one shape after which a macro aligns all the shapes that are within a 'short range' of the selected shape.</p>
  
  <p>Therefore I wrote the following code that selects all the object within a range:</p>
  
  <pre><code>Sub Shape_Dimensions()
  
  Dim L As Long
  Dim T As Long
  Dim H As Long
  Dim W As Long
  
  With ActiveWindow.Selection
      If .Type = ppSelectionShapes Then
          L = .ShapeRange.Left
          T = .ShapeRange.Top
          H = .ShapeRange.Height
          W = .ShapeRange.Width
      Else
          MsgBox "You have not selected an OBJECT in PowerPoint to dimension."
          Exit Sub
      End If
  End With
  
   'Set range for selection
   TopRange = L + 30
   DownRange = T + H + 20
   'Left and right are 0 - 600
  
  End Sub
  </code></pre>
  
  <p>Now the final step I want to take is select all shapes that are within the top range and down range and align them with the top of the selected box. Any thoughts on how I should proceed?</p>