Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-23-2012, 06:29 PM
JBeaucaire JBeaucaire is offline Excel - move with tab through named range Windows XP Excel - move with tab through named range Office 2003
Advanced Beginner
 
Join Date: Dec 2011
Posts: 51
JBeaucaire is on a distinguished road
Default

It's kludgy, but something like this would be. you can put a Worksheet_SelectionChange event into the sheet module to watch what cell you were in LAST and force Excel to select the next cell in a "Map" you create.

Code:
Option Explicit
Dim Prior As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Prior Is Nothing Then
    Range("A1").Select
    Set Prior = Selection
    Exit Sub
End If

Application.EnableEvents = False
Select Case Prior.Address
    Case "$A$1", "$A$2", "$A$3", "$A$4", "$A$5", "$A$6"
        Prior.Offset(1).Select
        Set Prior = Selection
    Case "$A$7"
        Range("B1").Select
        Set Prior = Selection
    Case "$B$1", "$B$2", "$B$3", "$B$4", "$B$5", "$B$6"
        Prior.Offset(1).Select
        Set Prior = Selection
    Case "$B$7"
        Range("A10").Select
        Set Prior = Selection
    Case "$A$10", "$A$11", "$A$12", "$A$13", "$A$14", "$A$15", "$A$16"
        Prior.Offset(1).Select
        Set Prior = Selection
    Case "$A$17"
        Range("B10").Select
        Set Prior = Selection
    Case "$B$10", "$B$11", "$B$12", "$B$13", "$B$14", "$B$15", "$B$16"
        Prior.Offset(1).Select
        Set Prior = Selection
    Case "$B$17"
        Range("A1").Select
        Set Prior = Selection
End Select
Application.EnableEvents = True

End Sub
Reply With Quote
 

Tags
named range, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use named ranges in excel vba? bosve73 Excel Programming 4 01-25-2012 09:26 AM
Excel - move with tab through named range load list box from range in excel Joe Patrick Word VBA 8 06-07-2011 09:31 AM
Excel - move with tab through named range Named range drop-down jgelpi16 Excel 1 04-08-2011 03:08 PM
Can't import home adresses in outlook 2010 from excel named ranges eekie Outlook 0 05-14-2010 02:04 PM
Through VBA, export range from Excel to Word duugg Word VBA 0 08-24-2009 07:50 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft