Tab through named ranges

jmersing

Well-known Member
Joined
Apr 14, 2004
Messages
887
I have 5 named ranges i.e. Range1, Range2 etc.

Is there a way I can tab through them by pressing the tab key or some other method.

I want the user to be able to go to their first named range, possibly make some adjust ments, and then go on to the next range and so on.

Thanks
 

Some videos you may like

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

jmersing

Well-known Member
Joined
Apr 14, 2004
Messages
887
No Andrew they are ranges, mostly named ranges i.e.
Range1
Range2
Range3 etc.

Is there a way I could loop through the sheet looking for any named range that begins with "range" and then use some kind of wildcard for the number. Because 1 sheet may have a different number of named ranges than the next. Here is what I have now:

Dim wsName As String
Dim RangeError As Boolean

Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
For Each ws In Worksheets
wsName = ws.Name
RangeError = False
Application.GoTo Reference:=ws.Range("range2")
If Not RangeError Then Application.Run Macro:="mymacro"
Next
On Error GoTo 0
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
Exit Sub
Code:
 

Watch MrExcel Video

Forum statistics

Threads
1,118,080
Messages
5,570,085
Members
412,310
Latest member
mark884
Top