![]() |
#1
|
|||
|
|||
![]()
Hi all,
I am trying to exit a loop or go to a certain place in the procedure once an error has been found. It works fine on the first iteration but the second time it doesn't recognise the on error commmand. Below is the piece of code. thanks in advance. Sub FindTable() startloop: 'Find first table Selection.GoTo What:=wdGoToTable, Which:=wdGoToFirst, Count:=1, Name:="" 'If can not find any more tables exit loop On Error GoTo endloop: Selection.Tables(1).Cell(1, 1).Select 'If can not find row 2 column 3 go to local handler On Error GoTo LocalHandler: Selection.Tables(1).Cell(2, 3).Select LocalHandler: 'Reset on error On Error GoTo 0 GoTo startloop: endloop: End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Re-installing Office - reset Product Key? | Knights | Office | 1 | 05-21-2009 02:36 PM |
![]() |
Renee Hendershott | Word | 2 | 01-22-2006 06:59 PM |