Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2007

Tip: Looking for answers? Try searching our database.

Macro Needs to Skip Over Line If Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karin - 05 Apr 2007 16:36 GMT
Hi,  I need the correct language and placement to jump over a line in my
macro on error.  I want to jump over the last line (Application.TaskPane) on
error.  Thanks!  Following is my macro:

Sub AutoOpen()
'
' AutoOpen Macro
' Macro recorded 02/07/2007 by Karin Richardson
'
   With ActiveWindow.view
       .ShowRevisionsAndComments = False
       .RevisionsView = wdRevisionsViewFinal
       .ShowHiddenText = True
   End With
   Options.UpdateFieldsAtPrint = True
   Application.TaskPanes(wdTaskPaneFormatting).Visible = True
   
End Sub
Jean-Guy Marcil - 05 Apr 2007 20:44 GMT
Karin was telling us:
Karin nous racontait que :

> Hi,  I need the correct language and placement to jump over a line in
> my macro on error.  I want to jump over the last line
[quoted text clipped - 14 lines]
>
> End Sub

Use
   On Error Resume Next
But, it is generally better to try to understand why an error occurs and
code accordingly...

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Karin - 06 Apr 2007 20:08 GMT
Thank you.   The error occurs when a form is opened that is locked for editing.

> Karin was telling us:
> Karin nous racontait que :
[quoted text clipped - 22 lines]
> But, it is generally better to try to understand why an error occurs and
> code accordingly...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.