R
Rookie 1st class
Public Sub TestRanges() 'Sort or Modify columns Macro
Sheets("Rockwell").Select
NamedRanges = Array("Scl1", "Scl2", "Scl3", "Scl4", "Scl5", "Scl6",
"Scl7", "Scl8", "Scl9", "Scl10")
For Each NRange In NamedRanges
Set isect = Application.Intersect(Range(NRange), ActiveCell)
If Not isect Is Nothing Then
Worksheets("Rockwell").Select
Load Rckwll
Rckwll.Show
Unload Rckwll
Exit For
End If
Next NRange
End Sub
Thanks to Joel for this code. It works great provided I select one of the
"Scls". I'd like to add a message that tells the user what to do if one of
the Scls isn't selected.
TIA
Lou
Sheets("Rockwell").Select
NamedRanges = Array("Scl1", "Scl2", "Scl3", "Scl4", "Scl5", "Scl6",
"Scl7", "Scl8", "Scl9", "Scl10")
For Each NRange In NamedRanges
Set isect = Application.Intersect(Range(NRange), ActiveCell)
If Not isect Is Nothing Then
Worksheets("Rockwell").Select
Load Rckwll
Rckwll.Show
Unload Rckwll
Exit For
End If
Next NRange
End Sub
Thanks to Joel for this code. It works great provided I select one of the
"Scls". I'd like to add a message that tells the user what to do if one of
the Scls isn't selected.
TIA
Lou