Highlight Cell Help

L

LTOSH

I was looking for a way to highlight a cell that i am currently going to type
in. After looking through this forum i have seen the suggestion of
"rowliner". i downloaded it and it is doing what it suggests however, I
desire my worksheet to be protected but it doesn't work once i protect the
worksheet.

what do i do? i only want to highlight cells that are unlocked for the user
as i tab through the worksheet. make sense??

thanks.
LTOSH
 
P

Per Jessen

Hi

You have to unprotect the sheet, change formatting af re-protect the sheet.

Dim LastCell As Range
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Unprotect Password:="JustMe"
If Not LastCell Is Nothing Then
LastCell.Interior.ColorIndex = 0
End If
If Target.Locked = False Then
Target.Interior.ColorIndex = 4
End If
Set LastCell = Target
ActiveSheet.Protect Password:="JustMe"
End Sub

Regards,
Per
 
L

LTOSH

Can you please tell me where I am supposed to go to type in the information
you provided. I understand the unprotect the sheet but don'tunderstand about
change formatting of re-protect the sheet.
 
L

LTOSH

Thanks Dan however this link is to highlight both a row and column. i only
want to highlight an unlocked cell when worksheet is protected.
 
C

Chip Pearson

My RowLiner add-in, and other similar add-ins floating around the net,
use drawing tools to draw shapes on the worksheet to highlight the
cell or draw the lines. This can't be done on a protected worksheet.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
L

LTOSH

thanks for the explanation but again i refer back to my original question.
How do you highlight or color fill a cell that you are about to type in and
be able to protect your worksheet?
 
F

Fred Smith

Your question has been answered, quickly and accurately -- in fact, within
23 minutes of your original post. The fact you don't like the answer doesn't
change its efficacy, and won't change what you need to do.

You must unprotect the worksheet, apply the highlighting, then reprotect the
sheet. A macro was even supplied to allow you to do this easily.

You can either have a solution or be stubborn. Your choice.

Regards,
Fred.
 
L

LTOSH

Mr. Smith I do not appreciate your tone towards me or my post.

I did try to use the answer to my original post from Per Jessen and it did
not work for some reason once i protected it again. That is why I asked for
clarification from Per Jessen to where I am suppose to place the information
that was provided so i could make sure i was putting that information in the
correct location and try to figure out why it did not work for me as you so
crassly stated that it should be so easy. If this was easy for me I would
not be posting questions on this forum seeking help.

As far as the other responses(from Dan and Chip) to my question I was merely
answering each one. Just becuase I responded in a way that did not suit you
Mr. Smith did not mean in anyway that I did not like the answers that were
given.

Please be careful not to belittle or judge those who come here seeking help
with questions as I am sure I am not the only one who is not fluent in Excel
or any other programs that this forum offers help for.

Now...I appreciate all the help from those who contribute their knowledge to
this site and greatly appreciate their time.

LTosh
 
P

Per Jessen

Hi

Place my code in the code sheet for ThisWorkbook.

The DIM statement has to be pasted at the very top of the module, ie.
above any module. By declaring the variable outside any Sub, the value
of the variable can be used next time the macro event fire.

My macro unprotect the sheet using the password 'JustMe' then if
LastCell has a cell reference remove the highlight from the cell,
highlight current cell if locked property is 'False' and protect the
sheet again.

Hopes this helps.
....
Per
 
L

LTOSH

Thank you so much Per for taking the time to explain what you posted...makes
sense now and works perfectly...I had left out part about the DIM statement.
I appreciate your time on this.
LTOSH
 

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