![]() |
events doesnt work
Hi,
Application.EnableEvents = False Did you do something like that somewhere else in your codings? If you did, just turn it on by including this small routine Private Sub Worksheet_Activate() Application.EnableEvents = True End Sub Hope it works. Regards, Faiz "benitAAvi" wrote: Hi In excel 2003, i try to use an event located in a worksheet, but it seems that no event works. For exemple, i put this code in sheet1 and i do not get any reaction when selecting a cell. Private Sub Worksheet_SelectionChange(ByVal Target _ As Excel.Range) Cells.Interior.ColorIndex = xlNone With ActiveCell .EntireRow.Interior.ColorIndex = 1 .EntireColumn.Interior.ColorIndex = 1 End With End Sub Only Auto_Open(and Close) events seem to work. Is there something i did, wrong or do i need to add some reference? Thanks a lot Avi |
events doesnt work
Hi
In excel 2003, i try to use an event located in a worksheet, but it seems that no event works. For exemple, i put this code in sheet1 and i do not get any reaction when selecting a cell. Private Sub Worksheet_SelectionChange(ByVal Target _ As Excel.Range) Cells.Interior.ColorIndex = xlNone With ActiveCell .EntireRow.Interior.ColorIndex = 1 .EntireColumn.Interior.ColorIndex = 1 End With End Sub Only Auto_Open(and Close) events seem to work. Is there something i did, wrong or do i need to add some reference? Thanks a lot Avi |
events doesnt work
If you did, just turn it on by including this small routine
Private Sub Worksheet_Activate() Application.EnableEvents = True End Sub If EnableEvents is false, how do you expect this event to be called? -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Noor Faiz" wrote in message ... Hi, Application.EnableEvents = False Did you do something like that somewhere else in your codings? If you did, just turn it on by including this small routine Private Sub Worksheet_Activate() Application.EnableEvents = True End Sub Hope it works. Regards, Faiz "benitAAvi" wrote: Hi In excel 2003, i try to use an event located in a worksheet, but it seems that no event works. For exemple, i put this code in sheet1 and i do not get any reaction when selecting a cell. Private Sub Worksheet_SelectionChange(ByVal Target _ As Excel.Range) Cells.Interior.ColorIndex = xlNone With ActiveCell .EntireRow.Interior.ColorIndex = 1 .EntireColumn.Interior.ColorIndex = 1 End With End Sub Only Auto_Open(and Close) events seem to work. Is there something i did, wrong or do i need to add some reference? Thanks a lot Avi |
All times are GMT +1. The time now is 04:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com