Tabbed cells?

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
 
J

Jon Peltier

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
 
P

Phil Hageman

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
_______



.
 
P

Phil Hageman

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

Jon Peltier

Phil -

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

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top