Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why doesnt this work? | Excel Worksheet Functions | |||
Why doesnt this work | New Users to Excel | |||
TAB Key doesnt work. | Excel Programming | |||
code doesnt work | Excel Programming | |||
code doesnt work | Excel Programming |