View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Active cell highlight

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