Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel,microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a piece of code that doesn't respond to error handling:
On Error GoTo question_end secondblank = Range("a" & firstqunw & ":a100").Find(What:="", LookAt:=xlWhole).Row It finds the second blank space in a column. When the column is empty it fails (as I would expect) but then instead of error handling it crashes with: run-time error 91 object variable or With block variable not set Any help or suggestions gratefully received tp full code is If ActiveSheet.UsedRange.Count < 2 Then MsgBox "There are no results available yet for that sheet" Else Dim firstblank As String Dim firstqunw As String Dim secondblank As String Dim firstqwei As String On Error GoTo question_error firstblank = Columns("a:a").Find(What:="", LookAt:=xlWhole).Row firstqunw = firstblank + 2 Cells.FindNext(After:=ActiveCell).Activate On Error GoTo question_end secondblank = Range("a" & firstqunw & ":a100").Find(What:="", LookAt:=xlWhole).Row Cells.FindNext(After:=ActiveCell).Activate firstqwei = secondblank + 1 End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel crashes on "Close" Visual Basic error 400 | Excel Discussion (Misc queries) | |||
copy range of cells with blanks then paste without blanks | Excel Worksheet Functions | |||
help with this error-Compile error: cant find project or library | Excel Discussion (Misc queries) | |||
replace "#DIV/0!" error with blanks | Excel Worksheet Functions | |||
Paste Special Skip Blanks not skipping blanks, but overwriting... | Excel Discussion (Misc queries) |