Tabbed cells?

  • Thread starter Thread starter Phil Hageman
  • Start date Start date
P

Phil Hageman

Is there code I can put in a worksheet code page that will
tab only certain cells, and not allow the user to select
any other cell? Unprotected cells are the targets here.

Thanks, Phil
 
Phil -

First, unlock the cells you want to allow access to, then protect the
worksheet. In vba, either in a procedure or in the immediate window,
use this command:

activesheet.enableselection = xlunlockedcells

Unfortunately, the workbook forgets this setting, so you have to reapply
it whenever it is reopened.

- Jon
 
Thanks, Jon - I'll try it out.
-----Original Message-----
Phil -

First, unlock the cells you want to allow access to, then protect the
worksheet. In vba, either in a procedure or in the immediate window,
use this command:

activesheet.enableselection = xlunlockedcells

Unfortunately, the workbook forgets this setting, so you have to reapply
it whenever it is reopened.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______



.
 
This works fine - it tabs all the unlocked cells. Now, is
there a way to keep the user from selecting a locked cell?
 
Phil -

The line of code I provided should do that as well:
activesheet.enableselection = xlunlockedcells

- Jon
 
Back
Top