Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Tabbing in excel-use VBA

I was wondering if you can set tabs in excel to tab to unlocked cells only.
I can't find any information about this but it seems like it should be
possible. I am not using a form, just a spreadsheet. But I have written
alot of VBA code if there is a way to do it that way. ANy ideas.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Tabbing in excel-use VBA

That is the default behaviour in Excel with unlocked cells in a protected
worksheet.

But only in left to right and top to bottom order.

If your order is other that that.......................

Private Sub Worksheet_Change(ByVal Target As Range)
'Anne Troy's taborder event code
Dim aTabOrd As Variant
Dim i As Long

'Set the tab order of input cells
aTabOrd = Array("A5", "B10", "C5", "A10", "B1", "C3") 'adjust to suit

'Loop through the array of cell address
For i = LBound(aTabOrd) To UBound(aTabOrd)
'If the cell that's changed is in the array
If aTabOrd(i) = Target.Address(0, 0) Then
'If the cell that's changed is the last in the array
If i = UBound(aTabOrd) Then
'Select first cell in the array
Me.Range(aTabOrd(LBound(aTabOrd))).Select
Else
'Select next cell in the array
Me.Range(aTabOrd(i + 1)).Select
End If
End If
Next i

End Sub


Gord Dibben MS Excel MVP

On Sun, 18 Apr 2010 09:45:01 -0700, Phyllis
wrote:

I was wondering if you can set tabs in excel to tab to unlocked cells only.
I can't find any information about this but it seems like it should be
possible. I am not using a form, just a spreadsheet. But I have written
alot of VBA code if there is a way to do it that way. ANy ideas.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Tabbing in excel-use VBA

Thank you. The tabbing code works great.

"Phyllis" wrote:

I was wondering if you can set tabs in excel to tab to unlocked cells only.
I can't find any information about this but it seems like it should be
possible. I am not using a form, just a spreadsheet. But I have written
alot of VBA code if there is a way to do it that way. ANy ideas.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel; tabbing through protected worksheet rvtrails Excel Discussion (Misc queries) 2 December 19th 09 08:20 PM
Tabbing order in Excel form RUSH2CROCHET Excel Discussion (Misc queries) 2 September 4th 09 07:36 PM
Excel tabbing doesn't work JL Excel Discussion (Misc queries) 2 July 28th 06 04:15 PM
Tabbing in Excel bretye2 Excel Worksheet Functions 1 March 15th 06 07:01 PM
Tabbing between cells in Excel Stumped Excel Discussion (Misc queries) 3 February 16th 06 02:52 PM


All times are GMT +1. The time now is 08:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"