Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Thread Tools Display Modes
Old 09-23-2008, 08:15 PM
kiwichico kiwichico is offline
Reset on error
Join Date: Sep 2008
Posts: 1
kiwichico is on a distinguished road
Default Reset on error

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()

'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


'Reset on error
On Error GoTo 0

GoTo startloop:
End Sub
Reply With Quote

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re-installing Office - reset Product Key? Knights Office 1 05-21-2009 02:36 PM
Reset on error Page opens at 175% zoom. How can I reset the default? Renee Hendershott Word 2 01-22-2006 06:59 PM

All times are GMT -7. The time now is 08:09 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd. is not affiliated with Microsoft