<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Tab Order of Cells</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 12:03:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Jim</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/#comment-73444</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Tue, 07 Feb 2012 06:47:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=671#comment-73444</guid>
		<description>Thanks I will give it a try.</description>
		<content:encoded><![CDATA[<p>Thanks I will give it a try.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/#comment-73401</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Mon, 06 Feb 2012 13:38:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=671#comment-73401</guid>
		<description>Jim: You may have run into a limit using the line continuation character rather than an array limit.  Rewrite you code so that you&#039;re filling the array one by one rather than using the Array function.  Like this

&lt;code lang=&quot;vb&quot;&gt;Private Sub Worksheet_Change(ByVal Target As Range)

    Dim aTabOrd(1 To 12) As String
    Dim i As Long

    &#039;Set the tab order of input cells
    aTabOrd(1) = &quot;B1&quot;: aTabOrd(2) = &quot;B2&quot;: aTabOrd(3) = &quot;B3&quot;: aTabOrd(4) = &quot;H1&quot;
    aTabOrd(5) = &quot;H2&quot;: aTabOrd(6) = &quot;H3&quot;: aTabOrd(7) = &quot;C6&quot;: aTabOrd(8) = &quot;G6&quot;
    aTabOrd(9) = &quot;B7&quot;: aTabOrd(10) = &quot;B8&quot;: aTabOrd(11) = &quot;B9&quot;: aTabOrd(12) = &quot;E9&quot;

    &#039;Loop through the array of cell address
    For i = LBound(aTabOrd) To UBound(aTabOrd)
        &#039;If the cell that’s changed is in the array
        If aTabOrd(i) = Target.Address(0, 0) Then
            &#039;If the cell that’s changed is the last in the array
            If i = UBound(aTabOrd) Then
                &#039;Select first cell in the array
                Me.Range(aTabOrd(LBound(aTabOrd))).Select
            Else
                &#039;Select next cell in the array
                Me.Range(aTabOrd(i + 1)).Select
            End If
        End If
    Next i
    
End Sub&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Jim: You may have run into a limit using the line continuation character rather than an array limit.  Rewrite you code so that you&#8217;re filling the array one by one rather than using the Array function.  Like this</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #E56717; font-weight: bold;">Private</span> <span style="color: #E56717; font-weight: bold;">Sub</span> Worksheet_Change(<span style="color: #151B8D; font-weight: bold;">ByVal</span> Target <span style="color: #151B8D; font-weight: bold;">As</span> Range)<br />
<br />
&nbsp; &nbsp; <span style="color: #151B8D; font-weight: bold;">Dim</span> aTabOrd(1 <span style="color: #8D38C9; font-weight: bold;">To</span> 12) <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span><br />
&nbsp; &nbsp; <span style="color: #151B8D; font-weight: bold;">Dim</span> i <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Long</span><br />
<br />
&nbsp; &nbsp; <span style="color: #008000;">'Set the tab order of input cells<br />
</span> &nbsp; &nbsp;aTabOrd(1) = <span style="color: #800000;">&quot;B1&quot;</span>: aTabOrd(2) = <span style="color: #800000;">&quot;B2&quot;</span>: aTabOrd(3) = <span style="color: #800000;">&quot;B3&quot;</span>: aTabOrd(4) = <span style="color: #800000;">&quot;H1&quot;</span><br />
&nbsp; &nbsp; aTabOrd(5) = <span style="color: #800000;">&quot;H2&quot;</span>: aTabOrd(6) = <span style="color: #800000;">&quot;H3&quot;</span>: aTabOrd(7) = <span style="color: #800000;">&quot;C6&quot;</span>: aTabOrd(8) = <span style="color: #800000;">&quot;G6&quot;</span><br />
&nbsp; &nbsp; aTabOrd(9) = <span style="color: #800000;">&quot;B7&quot;</span>: aTabOrd(10) = <span style="color: #800000;">&quot;B8&quot;</span>: aTabOrd(11) = <span style="color: #800000;">&quot;B9&quot;</span>: aTabOrd(12) = <span style="color: #800000;">&quot;E9&quot;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #008000;">'Loop through the array of cell address<br />
</span> &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">For</span> i = <span style="color: #151B8D; font-weight: bold;">LBound</span>(aTabOrd) <span style="color: #8D38C9; font-weight: bold;">To</span> <span style="color: #151B8D; font-weight: bold;">UBound</span>(aTabOrd)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">'If the cell that’s changed is in the array<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">If</span> aTabOrd(i) = Target.Address(0, 0) <span style="color: #8D38C9; font-weight: bold;">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">'If the cell that’s changed is the last in the array<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">If</span> i = <span style="color: #151B8D; font-weight: bold;">UBound</span>(aTabOrd) <span style="color: #8D38C9; font-weight: bold;">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">'Select first cell in the array<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Me.Range(aTabOrd(<span style="color: #151B8D; font-weight: bold;">LBound</span>(aTabOrd))).<span style="color: #8D38C9; font-weight: bold;">Select</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">Else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">'Select next cell in the array<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Me.Range(aTabOrd(i + 1)).<span style="color: #8D38C9; font-weight: bold;">Select</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span><br />
&nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">Next</span> i<br />
&nbsp; &nbsp; <br />
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span></div></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/#comment-73343</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Sun, 05 Feb 2012 03:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=671#comment-73343</guid>
		<description>Tray do you know if there is a maximum on the cells that can be in the tab order. I have a spreadsheet with 180 cells I need to add to the tab order. I have entered 147 cells and it will not allow me to add any more. I also tried the underscore you have at the end of each row but get a code error.
Thanks</description>
		<content:encoded><![CDATA[<p>Tray do you know if there is a maximum on the cells that can be in the tab order. I have a spreadsheet with 180 cells I need to add to the tab order. I have entered 147 cells and it will not allow me to add any more. I also tried the underscore you have at the end of each row but get a code error.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tray</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/#comment-73107</link>
		<dc:creator>Tray</dc:creator>
		<pubDate>Tue, 31 Jan 2012 17:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=671#comment-73107</guid>
		<description>Seems I had some code issues. Fixed it with the help of others. 
Fixed Code:
&lt;code lang=&quot;vb&quot;&gt;Private Sub Worksheet_Change(ByVal Target As Range)

    Dim aTabOrd As Variant
    Dim i As Long

    &#039;Set the tab order of input cells
    aTabOrd = Array(&quot;B1&quot;, &quot;B2&quot;, &quot;B3&quot;, &quot;H1&quot;, &quot;H2&quot;, &quot;H3&quot;, &quot;C6&quot;, &quot;G6&quot;, &quot;B7&quot;, &quot;B8&quot;, &quot;B9&quot;, &quot;E9&quot;, _
    &quot;G9&quot;, &quot;A11&quot;, &quot;B11&quot;, &quot;C11&quot;, &quot;I11&quot;, &quot;A12&quot;, &quot;A15&quot;, &quot;B15&quot;, &quot;H15&quot;, &quot;A16&quot;, &quot;B16&quot;, &quot;H16&quot;, &quot;A17&quot;, _
    &quot;B17&quot;, &quot;H17&quot;, &quot;A18&quot;, &quot;B18&quot;, &quot;H18&quot;, &quot;A19&quot;, &quot;B19&quot;, &quot;H19&quot;, &quot;A20&quot;, &quot;B20&quot;, &quot;H20&quot;, &quot;A21&quot;, &quot;B21&quot;, _
    &quot;H21&quot;, &quot;A22&quot;, &quot;B22&quot;, &quot;H22&quot;, &quot;A23&quot;, &quot;B23&quot;, &quot;H23&quot;, &quot;A24&quot;, &quot;B24&quot;, &quot;H24&quot;, &quot;I26&quot;, &quot;I28&quot;, &quot;A26&quot;)

    &#039;Loop through the array of cell address
    For i = LBound(aTabOrd) To UBound(aTabOrd)
        &#039;If the cell that’s changed is in the array
        If aTabOrd(i) = Target.Address(0, 0) Then
            &#039;If the cell that’s changed is the last in the array
            If i = UBound(aTabOrd) Then
                &#039;Select first cell in the array
                Me.Range(aTabOrd(LBound(aTabOrd))).Select
            Else
                &#039;Select next cell in the array
                Me.Range(aTabOrd(i + 1)).Select
            End If
        End If
    Next i
    
End Sub&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Seems I had some code issues. Fixed it with the help of others.<br />
Fixed Code:</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #E56717; font-weight: bold;">Private</span> <span style="color: #E56717; font-weight: bold;">Sub</span> Worksheet_Change(<span style="color: #151B8D; font-weight: bold;">ByVal</span> Target <span style="color: #151B8D; font-weight: bold;">As</span> Range)<br />
<br />
&nbsp; &nbsp; <span style="color: #151B8D; font-weight: bold;">Dim</span> aTabOrd <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Variant</span><br />
&nbsp; &nbsp; <span style="color: #151B8D; font-weight: bold;">Dim</span> i <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Long</span><br />
<br />
&nbsp; &nbsp; <span style="color: #008000;">'Set the tab order of input cells<br />
</span> &nbsp; &nbsp;aTabOrd = Array(<span style="color: #800000;">&quot;B1&quot;</span>, <span style="color: #800000;">&quot;B2&quot;</span>, <span style="color: #800000;">&quot;B3&quot;</span>, <span style="color: #800000;">&quot;H1&quot;</span>, <span style="color: #800000;">&quot;H2&quot;</span>, <span style="color: #800000;">&quot;H3&quot;</span>, <span style="color: #800000;">&quot;C6&quot;</span>, <span style="color: #800000;">&quot;G6&quot;</span>, <span style="color: #800000;">&quot;B7&quot;</span>, <span style="color: #800000;">&quot;B8&quot;</span>, <span style="color: #800000;">&quot;B9&quot;</span>, <span style="color: #800000;">&quot;E9&quot;</span>, _<br />
&nbsp; &nbsp; <span style="color: #800000;">&quot;G9&quot;</span>, <span style="color: #800000;">&quot;A11&quot;</span>, <span style="color: #800000;">&quot;B11&quot;</span>, <span style="color: #800000;">&quot;C11&quot;</span>, <span style="color: #800000;">&quot;I11&quot;</span>, <span style="color: #800000;">&quot;A12&quot;</span>, <span style="color: #800000;">&quot;A15&quot;</span>, <span style="color: #800000;">&quot;B15&quot;</span>, <span style="color: #800000;">&quot;H15&quot;</span>, <span style="color: #800000;">&quot;A16&quot;</span>, <span style="color: #800000;">&quot;B16&quot;</span>, <span style="color: #800000;">&quot;H16&quot;</span>, <span style="color: #800000;">&quot;A17&quot;</span>, _<br />
&nbsp; &nbsp; <span style="color: #800000;">&quot;B17&quot;</span>, <span style="color: #800000;">&quot;H17&quot;</span>, <span style="color: #800000;">&quot;A18&quot;</span>, <span style="color: #800000;">&quot;B18&quot;</span>, <span style="color: #800000;">&quot;H18&quot;</span>, <span style="color: #800000;">&quot;A19&quot;</span>, <span style="color: #800000;">&quot;B19&quot;</span>, <span style="color: #800000;">&quot;H19&quot;</span>, <span style="color: #800000;">&quot;A20&quot;</span>, <span style="color: #800000;">&quot;B20&quot;</span>, <span style="color: #800000;">&quot;H20&quot;</span>, <span style="color: #800000;">&quot;A21&quot;</span>, <span style="color: #800000;">&quot;B21&quot;</span>, _<br />
&nbsp; &nbsp; <span style="color: #800000;">&quot;H21&quot;</span>, <span style="color: #800000;">&quot;A22&quot;</span>, <span style="color: #800000;">&quot;B22&quot;</span>, <span style="color: #800000;">&quot;H22&quot;</span>, <span style="color: #800000;">&quot;A23&quot;</span>, <span style="color: #800000;">&quot;B23&quot;</span>, <span style="color: #800000;">&quot;H23&quot;</span>, <span style="color: #800000;">&quot;A24&quot;</span>, <span style="color: #800000;">&quot;B24&quot;</span>, <span style="color: #800000;">&quot;H24&quot;</span>, <span style="color: #800000;">&quot;I26&quot;</span>, <span style="color: #800000;">&quot;I28&quot;</span>, <span style="color: #800000;">&quot;A26&quot;</span>)<br />
<br />
&nbsp; &nbsp; <span style="color: #008000;">'Loop through the array of cell address<br />
</span> &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">For</span> i = <span style="color: #151B8D; font-weight: bold;">LBound</span>(aTabOrd) <span style="color: #8D38C9; font-weight: bold;">To</span> <span style="color: #151B8D; font-weight: bold;">UBound</span>(aTabOrd)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">'If the cell that’s changed is in the array<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">If</span> aTabOrd(i) = Target.Address(0, 0) <span style="color: #8D38C9; font-weight: bold;">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">'If the cell that’s changed is the last in the array<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">If</span> i = <span style="color: #151B8D; font-weight: bold;">UBound</span>(aTabOrd) <span style="color: #8D38C9; font-weight: bold;">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">'Select first cell in the array<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Me.Range(aTabOrd(<span style="color: #151B8D; font-weight: bold;">LBound</span>(aTabOrd))).<span style="color: #8D38C9; font-weight: bold;">Select</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">Else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">'Select next cell in the array<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Me.Range(aTabOrd(i + 1)).<span style="color: #8D38C9; font-weight: bold;">Select</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span><br />
&nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">Next</span> i<br />
&nbsp; &nbsp; <br />
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span></div></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tray</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/#comment-73062</link>
		<dc:creator>Tray</dc:creator>
		<pubDate>Tue, 31 Jan 2012 01:36:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=671#comment-73062</guid>
		<description>I have a simple excel invoice sheet that I am working on for a friend. He wants the tab order changed while in protected mode; I have unlocked the cells that he wants to fill in. I will be glad to email the spreadsheet out to anyone willing to look at it. I am far from a VB guy, so any help would be great. 
These are the directions I followed:
On the sheet for which you want to set the tab order, right-click the sheet tab and hit View Code. This opens the Visual Basic Editor (VBE). 
Paste the code into the code window that appears at right. 
Edit the Array line in the code to suit your tab order. 
Hit the Save diskette and close the VBE. 
Save and close your Excel workbook.

Here are two of the codes I tried:


Private Sub Worksheet_Change(ByVal Target As Range)


    Dim aTabOrder As Variant
    Dim i As Long
    
    ‘Set the tab order of input cells
    aTabOrder = Array (&quot;B1?, &quot;B2?, &quot;B3?, &quot;H1?, &quot;H2?, &quot;H3?, &quot;C6?, &quot;G6?, &quot;B7?, &quot;B8?, &quot;B9?, &quot;E9?, &quot;G9?, &quot;A11?, &quot;B11?, &quot;C11?, &quot;I11?, &quot;A12?, &quot;A15?, B15?, &quot;H15?, &quot;A16?, &quot;B16?, &quot;H16?, &quot;A17?, &quot;B17?, &quot;H17?, &quot;A18?, &quot;B18?, &quot;H18?, &quot;A19?, &quot;B19?, &quot;H19?, &quot;A20?, &quot;B20?, &quot;H20?, &quot;A21?, &quot;B21?, &quot;H21?, &quot;A22?, &quot;B22?, &quot;H22?, &quot;A23?, &quot;B23?, &quot;H23?, &quot;A24?, &quot;B24?, &quot;H24?, &quot;I26?, &quot;I28?, &quot;A26?)
    
    ‘Loop through the array of cell address
    For i = LBound(aTabOrder) To UBound(aTabOrder)
        ‘If the changed cell is in the array
        If aTabOrder(i) = Target.Address(0, 0) Then
            ‘If the changed cell is the last array element
            If i = UBound(aTabOrder) Then
                ‘Select the first cell in the array
                Me.Range(aTabOrder(LBound(aTabOrder))).Select
            Else
                ‘Select the next cell in the array
                Me.Range(aTabOrder(i + 1)).Select
            End If
        End If
    Next i
    
End Sub

Private Sub Worksheet_Change(ByVal Target As Range) 
     
    Dim aTabOrd As Variant 
    Dim i As Long 
     
     &#039;Set the tab order of input cells
    aTabOrd = Array(&quot;B1&quot;, &quot;B2&quot;, &quot;B3&quot;, &quot;H1&quot;, &quot;H2&quot;, &quot;H3&quot;, “C6”, “G6”, “B7”, “B8”, “B9”, “E9”, “G9”, “A11”, “B11”, “C11”, “I11”, “A12”, “A15”, B15”, “H15”, “A16”, “B16”, “H16”, “A17”, “B17”, “H17”, “A18”, “B18”, “H18”, “A19”, “B19”, “H19”, “A20”, “B20”, “H20”, “A21”, “B21”, “H21”, “A22”, “B22”, “H22”, “A23”, “B23”, “H23”, “A24”, “B24”, “H24”, “I26”, “I28”, “A26”) 
     
     &#039;Loop through the array of cell address
    For i = LBound(aTabOrd) To UBound(aTabOrd) 
         &#039;If the cell that&#039;s changed is in the array
        If aTabOrd(i) = Target.Address(0, 0) Then 
             &#039;If the cell that&#039;s changed is the last in the array
            If i = UBound(aTabOrd) Then 
                 &#039;Select first cell in the array
                Me.Range(aTabOrd(LBound(aTabOrd))).Select 
            Else 
                 &#039;Select next cell in the array
                Me.Range(aTabOrd(i + 1)).Select 
            End If 
        End If 
    Next i 
     
End Sub

I will be glad to email the spreadsheet out to anyone willing to look at it. I am far from a VB guy, so any help would be great.

Thanks,
Tray</description>
		<content:encoded><![CDATA[<p>I have a simple excel invoice sheet that I am working on for a friend. He wants the tab order changed while in protected mode; I have unlocked the cells that he wants to fill in. I will be glad to email the spreadsheet out to anyone willing to look at it. I am far from a VB guy, so any help would be great.<br />
These are the directions I followed:<br />
On the sheet for which you want to set the tab order, right-click the sheet tab and hit View Code. This opens the Visual Basic Editor (VBE).<br />
Paste the code into the code window that appears at right.<br />
Edit the Array line in the code to suit your tab order.<br />
Hit the Save diskette and close the VBE.<br />
Save and close your Excel workbook.</p>
<p>Here are two of the codes I tried:</p>
<p>Private Sub Worksheet_Change(ByVal Target As Range)</p>
<p>    Dim aTabOrder As Variant<br />
    Dim i As Long</p>
<p>    ‘Set the tab order of input cells<br />
    aTabOrder = Array (&#8220;B1?, &#8220;B2?, &#8220;B3?, &#8220;H1?, &#8220;H2?, &#8220;H3?, &#8220;C6?, &#8220;G6?, &#8220;B7?, &#8220;B8?, &#8220;B9?, &#8220;E9?, &#8220;G9?, &#8220;A11?, &#8220;B11?, &#8220;C11?, &#8220;I11?, &#8220;A12?, &#8220;A15?, B15?, &#8220;H15?, &#8220;A16?, &#8220;B16?, &#8220;H16?, &#8220;A17?, &#8220;B17?, &#8220;H17?, &#8220;A18?, &#8220;B18?, &#8220;H18?, &#8220;A19?, &#8220;B19?, &#8220;H19?, &#8220;A20?, &#8220;B20?, &#8220;H20?, &#8220;A21?, &#8220;B21?, &#8220;H21?, &#8220;A22?, &#8220;B22?, &#8220;H22?, &#8220;A23?, &#8220;B23?, &#8220;H23?, &#8220;A24?, &#8220;B24?, &#8220;H24?, &#8220;I26?, &#8220;I28?, &#8220;A26?)</p>
<p>    ‘Loop through the array of cell address<br />
    For i = LBound(aTabOrder) To UBound(aTabOrder)<br />
        ‘If the changed cell is in the array<br />
        If aTabOrder(i) = Target.Address(0, 0) Then<br />
            ‘If the changed cell is the last array element<br />
            If i = UBound(aTabOrder) Then<br />
                ‘Select the first cell in the array<br />
                Me.Range(aTabOrder(LBound(aTabOrder))).Select<br />
            Else<br />
                ‘Select the next cell in the array<br />
                Me.Range(aTabOrder(i + 1)).Select<br />
            End If<br />
        End If<br />
    Next i</p>
<p>End Sub</p>
<p>Private Sub Worksheet_Change(ByVal Target As Range) </p>
<p>    Dim aTabOrd As Variant<br />
    Dim i As Long </p>
<p>     &#8216;Set the tab order of input cells<br />
    aTabOrd = Array(&#8220;B1&#8243;, &#8220;B2&#8243;, &#8220;B3&#8243;, &#8220;H1&#8243;, &#8220;H2&#8243;, &#8220;H3&#8243;, “C6”, “G6”, “B7”, “B8”, “B9”, “E9”, “G9”, “A11”, “B11”, “C11”, “I11”, “A12”, “A15”, B15”, “H15”, “A16”, “B16”, “H16”, “A17”, “B17”, “H17”, “A18”, “B18”, “H18”, “A19”, “B19”, “H19”, “A20”, “B20”, “H20”, “A21”, “B21”, “H21”, “A22”, “B22”, “H22”, “A23”, “B23”, “H23”, “A24”, “B24”, “H24”, “I26”, “I28”, “A26”) </p>
<p>     &#8216;Loop through the array of cell address<br />
    For i = LBound(aTabOrd) To UBound(aTabOrd)<br />
         &#8216;If the cell that&#8217;s changed is in the array<br />
        If aTabOrd(i) = Target.Address(0, 0) Then<br />
             &#8216;If the cell that&#8217;s changed is the last in the array<br />
            If i = UBound(aTabOrd) Then<br />
                 &#8216;Select first cell in the array<br />
                Me.Range(aTabOrd(LBound(aTabOrd))).Select<br />
            Else<br />
                 &#8216;Select next cell in the array<br />
                Me.Range(aTabOrd(i + 1)).Select<br />
            End If<br />
        End If<br />
    Next i </p>
<p>End Sub</p>
<p>I will be glad to email the spreadsheet out to anyone willing to look at it. I am far from a VB guy, so any help would be great.</p>
<p>Thanks,<br />
Tray</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/#comment-66434</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Tue, 20 Sep 2011 20:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=671#comment-66434</guid>
		<description>&lt;p&gt;Tabbing through doesn&#039;t seem to work for Excel 2010 like it did for Excel 2003.  &lt;/p&gt;
&lt;p&gt;When I tab through, it will only go through a few of the unprotected cells.  When I move the cursor (click or arrow key) to one of the other unprotected cells, it will then proceed to the rest of them.  But starting from the top it again only cycles through a few cells.&lt;/p&gt;
&lt;p&gt;Glitch?  Feature to be turned off?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Tabbing through doesn&#8217;t seem to work for Excel 2010 like it did for Excel 2003.  </p>
<p>When I tab through, it will only go through a few of the unprotected cells.  When I move the cursor (click or arrow key) to one of the other unprotected cells, it will then proceed to the rest of them.  But starting from the top it again only cycles through a few cells.</p>
<p>Glitch?  Feature to be turned off?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Phillips</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/#comment-41620</link>
		<dc:creator>Bob Phillips</dc:creator>
		<pubDate>Tue, 13 Oct 2009 09:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=671#comment-41620</guid>
		<description>&lt;p&gt;Bruce, it is not hard event code.&lt;/p&gt;
&lt;p&gt;Send me a copy of the workbook, I will take a crack ... bob at xldynamic dot com&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Bruce, it is not hard event code.</p>
<p>Send me a copy of the workbook, I will take a crack &#8230; bob at xldynamic dot com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/#comment-41607</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Mon, 12 Oct 2009 18:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=671#comment-41607</guid>
		<description>&lt;p&gt;This is all greek to me and maybe I am in the wrong forum.  My boss is old fashioned an still does scheduling by hand (stubby pencil).  I created a spreadsheet for him using four cells and a diagonal line across two of them (top right (D7)/lower left (C8)) to look like the form he is using.  Begin shift time is in top left (C7) and end time in lower right (D8) and I have a bazillion on the page to make up two weeks (14 columns)worth of work and up to 30 employees (Rows).  Each day for each employee is 4 cells as described above.  When I Tab or Enter from C7 I would like for the next cell to be D8 and then C9 and then D10 and so on until I reach the end of the two weeks and then start over at C9 and then D10 for the next employee.  Is this possible with a third grade education and having already had 7 beers?  If not, will $1.40 get one of you to do it for me?  I didnt think so.  Help, please!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This is all greek to me and maybe I am in the wrong forum.  My boss is old fashioned an still does scheduling by hand (stubby pencil).  I created a spreadsheet for him using four cells and a diagonal line across two of them (top right (D7)/lower left (C8)) to look like the form he is using.  Begin shift time is in top left (C7) and end time in lower right (D8) and I have a bazillion on the page to make up two weeks (14 columns)worth of work and up to 30 employees (Rows).  Each day for each employee is 4 cells as described above.  When I Tab or Enter from C7 I would like for the next cell to be D8 and then C9 and then D10 and so on until I reach the end of the two weeks and then start over at C9 and then D10 for the next employee.  Is this possible with a third grade education and having already had 7 beers?  If not, will $1.40 get one of you to do it for me?  I didnt think so.  Help, please!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wayne</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/#comment-34802</link>
		<dc:creator>Wayne</dc:creator>
		<pubDate>Tue, 16 Sep 2008 09:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=671#comment-34802</guid>
		<description>&lt;p&gt;Zik, you can do that just by changing the options in excel.&lt;/p&gt;
&lt;p&gt;When pressing the enter button it can go either down or right.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Zik, you can do that just by changing the options in excel.</p>
<p>When pressing the enter button it can go either down or right.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zik</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/06/tab-order-of-cells/#comment-1921</link>
		<dc:creator>Zik</dc:creator>
		<pubDate>Sat, 18 Sep 2004 21:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=671#comment-1921</guid>
		<description>&lt;p&gt;I am using a digital gage, with SPC Cable and connection to my computer. My application requires me to measure click a button on the gage and the measurment will be input in excel, the problem i&#039;m having is that i want the active cell selection to move to the next horizontal cell, instead of cell below. In other words if i input data in a cell and then hit enter i want it to work as if i hit tab.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I am using a digital gage, with SPC Cable and connection to my computer. My application requires me to measure click a button on the gage and the measurment will be input in excel, the problem i&#8217;m having is that i want the active cell selection to move to the next horizontal cell, instead of cell below. In other words if i input data in a cell and then hit enter i want it to work as if i hit tab.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

