ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Control tab order of unlocked cells on a sheet (https://www.excelbanter.com/excel-programming/399936-control-tab-order-unlocked-cells-sheet.html)

XP

Control tab order of unlocked cells on a sheet
 
Using Office 2003 and Windows XP;

I have an Excel form in which I would like to control the tab order of
unprotected cells in a sheet. I plan to use the following suggested code I
found in another post on this site:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then Target.Offset(1).Select
If Target.Address = "$A$2" Then Target.Offset(1).Select
If Target.Address = "$A$3" Then Target.Offset(-2, 1).Select
'or
'If Target.Address = "$A$3" Then Range("b1").Select
End Sub

Three questions:

1) Is this the best method to use? Does anyone have any other good ideas?

2) My form has about 60 blanks in it; with a Change event tied to so many
cells, will there be a significant performance hit on the file/sheet? (I'd
like to know before I code all that)

3) Many of my "blanks" are merged cells, how do I reference a merged area
using the above code, just the top-most or left-most cell in the merge area?
or Do I need to reference the whole range of merged cells?

Thanks much in advance for your input/assistance.



Bob Phillips

Control tab order of unlocked cells on a sheet
 
http://xldynamic.com/source/xld.xlFAQ0008.html

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"XP" wrote in message
...
Using Office 2003 and Windows XP;

I have an Excel form in which I would like to control the tab order of
unprotected cells in a sheet. I plan to use the following suggested code I
found in another post on this site:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then Target.Offset(1).Select
If Target.Address = "$A$2" Then Target.Offset(1).Select
If Target.Address = "$A$3" Then Target.Offset(-2, 1).Select
'or
'If Target.Address = "$A$3" Then Range("b1").Select
End Sub

Three questions:

1) Is this the best method to use? Does anyone have any other good ideas?

2) My form has about 60 blanks in it; with a Change event tied to so many
cells, will there be a significant performance hit on the file/sheet? (I'd
like to know before I code all that)

3) Many of my "blanks" are merged cells, how do I reference a merged area
using the above code, just the top-most or left-most cell in the merge
area?
or Do I need to reference the whole range of merged cells?

Thanks much in advance for your input/assistance.






All times are GMT +1. The time now is 04:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com