Openoffice Macro Error Handler
Contents |
OpenOffice.org Basic Overview of a Basic Program Working With Variables Strings Numbers Boolean Values Date and Time Arrays Scope and Life Span of Variables Constants Operators Branching Loops Procedures and Functions Error Handling Other Instructions Runtime Library Conversion "on error goto -1" Functions Strings Date and Time Files and Directories Message and Input Boxes Other Functions
On Error Goto -1 Vba Excel
Introduction to the API Universal Network Objects (UNO) Properties and Methods Modules, Services and Interfaces Tools for Working with UNO openoffice iserror Overview of Central Interfaces Working with Documents The StarDesktop Styles and Templates Text Documents The Structure of Text Documents Editing Text Documents More than Just Text Spreadsheet Documents The Structure of Spreadsheets Rows and Columns Cells and Ranges Formatting Spreadsheet Documents Editing Spreadsheet Documents Drawings and Presentations The Structure of Drawings Editing Drawing Objects Presentations Charts (Diagrams) Using Charts in Spreadsheets The Structure of Charts Chart Types Databases SQL: a Query Language Types of Database Access Data Sources Database Access Dialogs Working With Dialogs Properties Events Dialog Control Elements Forms Working With Forms Control Element Forms Database Forms < Previous Page Next Page > Correct handling of error situations is one of the most time-consuming tasks of programming. OpenOffice.org Basic provides a range of tools for simplifying error handling. The On Error Instruction The On Error instruction is the key to any error handling: Sub Test On Error Goto ErrorHandler ' ... undertake task during which an error may occur Exit Sub ErrorHandler: ' ... individual code for error handling End Sub The On Error Goto ErrorHandler line defines how OpenOffice.org Basic proceeds in the event of an error. The Goto ErrorHandler ensures that OpenOffice.org Basic exits the current program line and then executes the ErrorHandler: code. The Resume Command The Resume Next command continues the program from the line that follows where the error occurred in the program after the code in the error handler has been executed: ErrorHandler: ' ... individual code for error handling Resume Next Use the Resume Proceed command to specify a jump point for continuing the program after error handling: ErrorHandler: ' ... individual code for error handling Resume Proceed Proceed: ' ... the program continues here after the error The term Proceed is a label. It could be for example, A247. The
an error occurs, or resumes program execution. Syntax: On {[Local] Error GoTo Labelname | GoTo 0 | Resume Next} Parameters: GoTo Labelname: If an error occurs, enables the error-handling routine that starts at the line "Labelname". Resume Next: If an error occurs, program execution continues with the statement that follows the statement in which the error occurred. GoTo 0: Disables the error handler in the current procedure. Local: "On error" is global in scope, and remains active until canceled by another "On error" statement. "On https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Error_Handling Local error" is local to the routine which invokes it. Local error handling overrides any previous global setting. When the invoking routine exits, the local error handling is canceled automatically, and any previous global setting is restored. The On Error GoTo statement is used to react to errors that occur in a macro. Example: Sub ExampleReset On Error GoTo ErrorHandler Dim iNumber As Integer Dim iCount As Integer https://help.libreoffice.org/Basic/On_Error_GoTo_..._Resume_Statement_Runtime Dim sLine As String Dim aFile As String aFile = "c:\data.txt" iNumber = Freefile Open aFile For Output As #iNumber Print #iNumber, "This is a line of text" Close #iNumber iNumber = Freefile Open aFile For Input As iNumber For iCount = 1 To 5 Line Input #iNumber, sLine If sLine <>"" Then Rem End If Next iCount Close #iNumber Exit Sub ErrorHandler: Reset MsgBox "All files will be closed",0,"Error" End Sub Retrieved from "http://help.libreoffice.org/index.php?title=Basic/On_Error_GoTo_..._Resume_Statement_Runtime&oldid=430250" Category: ENEN Navigation menu Personal tools Log in Namespaces Page Discussion Variants Views Read View source View history More Search Navigation Download LibreOffice Main page Random page Tools What links here Related changes Special pages Printable version Permanent link Page information This page was last modified 18:14:50, 2013-04-08 by LibreOffice Help user WikiSysop. Content is available under the GNU Lesser General Public License (LGPLv3), unless otherwise specified, originally based on OpenOffice.org help. "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy unless otherwise noted. Privacy policy About LibreOffice Help Disclaimers
εμάς.Μάθετε περισσότερα Το κατάλαβαΟ λογαριασμός μουΑναζήτησηΧάρτεςYouTubePlayΕιδήσειςGmailDriveΗμερολόγιοGoogle+ΜετάφρασηΦωτογραφίεςΠερισσότεραΈγγραφαBloggerΕπαφέςHangoutsΑκόμη περισσότερα από την GoogleΕίσοδοςΚρυφά πεδίαΒιβλίαbooks.google.gr - Providing https://books.google.gr/books?id=cHVIk-BlwA0C&pg=PA67&lpg=PA67&dq=openoffice+macro+error+handler&source=bl&ots=DWL_JlpJ5D&sig=oezYxXzIKSCKlCemctca1Eqlq74&hl=en&sa=X&ved=0ahUKEwjWr6rRp-TPAhVBWCwKHXmIDn0Q6AEISTAF complete and thorough coverage of macro programming in OpenOffice.org, this guide teaches users to create their own macros and to understand their underlying structure. An introduction to the creation and management of macros in error goto OpenOffice is presented, and each function and command is described....https://books.google.gr/books/about/OpenOffice_org_Macros_Explained.html?hl=el&id=cHVIk-BlwA0C&utm_source=gb-gplus-shareOpenOffice.org Macros ExplainedΗ βιβλιοθήκη μουΒοήθειαΣύνθετη Αναζήτηση ΒιβλίωνΑποκτήστε το εκτυπωμένο βιβλίοΔεν υπάρχουν διαθέσιμα eBookHentzenwerkeΕλευθερουδάκηςΠαπασωτηρίουΕύρεση σε κάποια βιβλιοθήκηΌλοι οι πωλητές»Αγορά βιβλίων στο Google PlayΠεριηγηθείτε στο μεγαλύτερο ηλεκτρονικό on error goto βιβλιοπωλείο του κόσμου και ξεκινήστε να διαβάζετε σήμερα στον ιστό, το tablet, το τηλέφωνο ή το ereader σας.Άμεση μετάβαση στο Google Play »OpenOffice.org Macros ExplainedAndrew Douglas Pitonyak, C. Robert Pearsall, Amy BoyerHentzenwerke, 2004 - 476 σελίδες 1 Κριτικήhttps://books.google.gr/books/about/OpenOffice_org_Macros_Explained.html?hl=el&id=cHVIk-BlwA0CProviding complete and thorough coverage of macro programming in OpenOffice.org, this guide teaches users to create their own macros and to understand their underlying structure. An introduction to the creation and management of macros in OpenOffice is presented, and each function and command is described. Specific techniques to perform a variety of commonly requested functions are provided, including actions common to all applications