Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bows to Rick. Your code worked properly.
I owe you 2 beverages of your choice. Thanks again Lou "Rick Rothstein" wrote: You didn't copy my code as I posted it (you should always consider copy/pasting rather than re-typing)... I didn't have an Exit For... I had an Exit Sub in the If..Then block. I'm pretty sure the code I posted would have worked as written. In any event, you have working code now, which is all that matters. I'll be sure to have an online cup of coffee on you... thanks.<g -- Rick (MVP - Excel) "Rookie 1st class" <Rookie1stClass@SpamThis wrote in message ... Final - Final It flashed the MsgBox even if one of the Arrays was selected. An additional Exit For corrected that. "Flashes HUGE Grin" 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 Else MsgBox "Select one of the ""Scale under test"" blocks, then run again." Exit For End If Next NRange End Sub I owe Joel, Simon, and Rick a beverage of their choice Many Thanks Guys 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 |