Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Change/macros not working
Hi all,
I have several sheets using Worksheet_Change. They work great. But... if there is an error the macros stop working. I close and open the workbook and the macros as still not working. How do I 'start them up' again? Thanks for any help. Regards, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Change/macros not working
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1:H10" '<== change to suit On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target ' do your stuff End With End If ws_exit: Application.EnableEvents = True End Sub -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Myriam" wrote in message ... Hi all, I have several sheets using Worksheet_Change. They work great. But... if there is an error the macros stop working. I close and open the workbook and the macros as still not working. How do I 'start them up' again? Thanks for any help. Regards, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Change/macros not working
Thanks! Perfect!
"Bob Phillips" wrote: Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "H1:H10" '<== change to suit On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target ' do your stuff End With End If ws_exit: Application.EnableEvents = True End Sub -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Myriam" wrote in message ... Hi all, I have several sheets using Worksheet_Change. They work great. But... if there is an error the macros stop working. I close and open the workbook and the macros as still not working. How do I 'start them up' again? Thanks for any help. Regards, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
worksheet_change not working | Excel Programming | |||
worksheet_change not working | Excel Programming | |||
Worksheet_Change method not working in Excel 97 | Excel Programming | |||
Worksheet_Change not working when using paste | Excel Programming | |||
Worksheet_Change Event Not Working | Excel Programming |