Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following marco that I have used with success to search through donwloaded data and take an action if "No Schedule" is found in the data. It has stopped functioning now and i get....Run-time error '91': Object variable or With block variable not set. I do not understand why it worked for months and now has stopped? The macro is below.
Sub FindNoSked() If Cells.Find(What:="No Schedule", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) = False Then Exit Sub End If 'copies No Schedule row if presentand appends Cells.Find(What:="No Schedule", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Select ActiveCell.Range("A1:N1").Select Selection.Copy Application.Goto Reference:="R1500C1" Selection.End(xlUp).Select ActiveCell.Offset(1, 0).Range("A1").Select ActiveSheet.Paste ActiveCell.Select Application.CutCopyMode = False End Sub Thanks for any help! Tonso |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run-time error 91: Object Variable or With block variable not set | Excel Programming | |||
Run-Time error '91': Object variable of With block variable not set | Excel Programming | |||
Run-time error '91': "Object variable or With block variable not set | Excel Programming | |||
Cells.Find error Object variable or With block variable not set | Excel Programming | |||
"Run-time error 91: Object variable or With block not set" | Excel Programming |