Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
The code pasted below loops thru a list, finds that value in a list on another sheet and deletes the entire row. I need to put an error handler in so that if the value is not found a msg box pops up to inform the user then continues the loop All help gratefully received. Dim delName As String Dim lr As Long Dim ur Sheets("TemporaryList").Activate Range("A1").Activate ur = Range(Selection, Selection.End(xlDown)).Address Range(ur).AdvancedFilter Action:=xlFilterInPlace, CopyToRange:=Columns( _ "E:E"), Unique:=True Range("A2").Activate Do Until ActiveCell.Value = "" Sheets("TemporaryList").Activate delName = ActiveCell.Value Sheets("Current").Activate With Worksheets("Current").Range("A:A") Set c = .Find(delName, lookin:=xlValues) c.EntireRow.Delete End With Sheets("TemporaryList").Activate ActiveCell.Offset(1, 0).Activate Loop MsgBox ("finished") Regards Michael Beckinsale |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
UDF Error Handling is ignored. Not for everyone? | Excel Programming | |||
Error Handling - On Error GoTo doesn't trap error successfully | Excel Programming | |||
Error handling with a handling routine | Excel Programming | |||
Error Handling | Excel Programming | |||
Error handling | Excel Programming |