Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Dec 2003
    Location
    Ossining, New York, USA
    Posts
    114
    Thanks
    4
    Thanked 2 Times in 2 Posts

    tab order (Excel 2003)

    I have a spreadsheet that is essentially a calendar- Jan to June on the left and July to December on the right. I have protected it so that I can only tab to the cells that I want. I have one minor problem. Normally I tab from B1 to H1 (Monday to Sunday). I want to tab from H1 to B2 not to K1 which is in July. How do I change the end of week tab order? I have been unsuccessful in looking this up.

    Thanks

    Fred

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: tab order (Excel 2003)

    If you don't mind not ever being able to select a cell in column I, then you could use the code below in the worksheet selection change event routine:

    <pre>Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Intersect(Target, Range("I:I")) Is Nothing Then
    Application.EnableEvents = False
    Range("A" & Target.Row + 1).Select
    Application.EnableEvents = True
    End If
    End Sub
    </pre>

    Legare Coleman

  3. #3
    2 Star Lounger
    Join Date
    Dec 2003
    Location
    Ossining, New York, USA
    Posts
    114
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Re: tab order (Excel 2003)

    I think what you are telling me is that there is not the simple solution that I had hoped for. Right now your solution is beyond my knowledge to implement. This is not earth shattering. I will live with things as they are now.

    Thank you for your effort. I hope that in a relatively short time my knowledge will catch up with your solution.

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: tab order (Excel 2003)

    Legare's solution is surprisingly simple to implement; right click the worksheet tab, select View Code, and paste the code in there, then save the workbook. Give it a try!

    Is it correct that your layout is Sun - Sat for the Jan - June in Columns B:H and then Sun - Sat for July - Dec is in Columns J:P? A similar solution to Legares' would be to protect all cells except in those columns, protect the sheet, and then use code like this, entered the same way:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If ActiveCell.Column = 9 Or ActiveCell.Column = 17 Then _
    ActiveCell.Offset(1, -7).Activate
    End Sub

    But you'd have to Click into a day in the second set of months to get into those July - December columns.
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •