Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run-time error 91: Object Variable or With block variable not set
Can someone help me out with this error. I can't figure out what it means and
what the problem is in the code. pastdueWSlastRow=279 ActiveWorkbook.Worksheets("PAST DUE SITES").AutoFilter.Sort.SortFields.Add Key _ :=Range("A3:A" & pastdueWSlastRow), SortOn:=xlSortOnValues, Order:=xlAscending, _ DataOption:=xlSortNormal |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run-time error 91: Object Variable or With block variable not set
Try this instead
With ActiveWorkbook.Worksheets("PAST DUE SITES") .Cells.AutoFilter .Rows("3:" & pastdueWSlastRow).Sort _ header:=xlNo, _ Key:=Range("A3"), _ Order:=xlAscending End With "Ayo" wrote: Can someone help me out with this error. I can't figure out what it means and what the problem is in the code. pastdueWSlastRow=279 ActiveWorkbook.Worksheets("PAST DUE SITES").AutoFilter.Sort.SortFields.Add Key _ :=Range("A3:A" & pastdueWSlastRow), SortOn:=xlSortOnValues, Order:=xlAscending, _ DataOption:=xlSortNormal |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run-Time error '91': Object variable of With block variable not set | Excel Programming | |||
Getting inconsistent Error 91-Object variable or With block variable not set | Excel Programming | |||
Run-time Error'91: Object variable or 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 |