View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.misc
Stanley Stanley is offline
external usenet poster
 
Posts: 15
Default Active cell highlight

Hi Dave,

I don't get it.
How to make it a step by step guide to do it.

Thanks.
stanley


"Dave Peterson" wrote:

That event (worksheet_selectionchange) is only going to work for the workbook
that owns the code. And since you've saved it as an addin, that workbook will
never be active.

You'll want to convert your procedure into a application event.

See Chip Pearson's notes:
http://www.cpearson.com/excel/AppEvent.htm

Stanley wrote:

Hi Dave

I have the following copied into the VB and safe it as .xla.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static LastChange
Application.ScreenUpdating = False
If LastChange = Empty Then
LastChange = ActiveCell.Address
End If
Range(LastChange).EntireColumn.Interior.ColorIndex = xlNone
Range(LastChange).EntireRow.Interior.ColorIndex = xlNone
ActiveCell.EntireColumn.Interior.ColorIndex = 15
ActiveCell.EntireRow.Interior.ColorIndex = 15
LastChange = ActiveCell.Address
Application.ScreenUpdating = True
End Sub

It looks perfect on the existing Excel.

I close all the Excel, and open a new Excel spreadsheet. Then, I loss this
function. I check in VB, it is there. I check in Add-Ins, it is already
checked/ticked, and what I can do to make it activated for all Excel I open?

Thanks.
stanley

"Dave Peterson" wrote:

maybe....

you may want to try Chip Pearson's Rowliner:
http://www.cpearson.com/excel/RowLiner.htm

E wrote:

Hi,

I would like to know if there was a way to have an active cell always in
yellow or any color.

Example: If the active cell is moved around, the active cell will be always
in yellow.

Thank you in advance

--

Dave Peterson


--

Dave Peterson