Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing contents of an array into a message box | Excel Programming | |||
Redimming an array dynamically assigned from range (how to redim first dimension of a 2-D array? /or/ reverse the original array order) | Excel Programming | |||
replace VBA run-time error message with custom message | Excel Programming | |||
Intercept/replace standard 'cell protected' message with my own message? | Excel Programming | |||
Displaying a message in a message box without requiring user to click anything to proceed | Excel Programming |