View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Who I Am Who I Am is offline
external usenet poster
 
Posts: 30
Default Run Event Code In General Module

Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

ActiveCell.EntireRow.Interior.ColorIndex = 6

If z = Empty Then
ElseIf Not z = ActiveCell.Row Then
Rows(z).EntireRow.Interior.ColorIndex = xlColorIndexNone
End If

z = ActiveCell.Row

End Sub

I run this code with a worksheet. It is perfect. Can I put this code
(or new version) in a module so I can run it in any active sheet, any
active workbook?

Thanks