Source property, Visual Basic Programming

Assignment Help:

Returns or sets the name of the object or application which generated the error originally. The Source property indicates a string expression which is usually the class name or programmatic ID of the object which caused the error. Use Source to present your users with information while your code is unable to handle an error generated into an accessed object. For instance, if you access Microsoft Excel & it generates a Division through zero error, Microsoft Excel sets the VBScript Err Object Number Property to its error code for that error & sets Source to Excel application. Note that if the error is generated into another object called through Microsoft Excel, Excel intercepts the error & sets Err.Number to its own code for Division through zero. Though, it leaves the other Err object (by including Source) as set by the object which generated the error.

Source always have the name of the object which originally generated the error - your code can attempt to handle the error according to the error documentation of the object you accessed. If you fail in error handler, you can employ the Err object information to define the error to your user, by using Source and the other Err to inform the user that object caused the error originally, a description of the error, and so forth.

Syntax

Err.Source [= stringexpression]

Argument :

stringexpression

A string expression representing the application which generated the error.


Related Discussions:- Source property

Conditional statements, You can control the flow of your script with condit...

You can control the flow of your script with conditional statements & looping statements.  By using conditional statements, you can write VBScript code which makes decisions and re

Program for add integers from 1-1000, Using Visual Studio 2010 C++ 1) U...

Using Visual Studio 2010 C++ 1) Using Windows Explorer, make a copy of Irvine\examples\Project_sample folder in the folder where you keep your materials for this course.

Vb script basics, This section will discuss the fundamentals of VBScript an...

This section will discuss the fundamentals of VBScript and define concepts such as datatypes, loops and others. VBScript Data Types VBScript contain only one data type called

Create vb to play a variation of hangman, Goal Create a Visual Basic th...

Goal Create a Visual Basic that allows a user to play a variation of Hangman. User Inputs • The user types a letter into the textbox. Functional Items 1. Read a series

Variant subtypes, Beyond the simple string or numeric classifications, Vari...

Beyond the simple string or numeric classifications, Variant can make added distinctions regarding the specific nature of numeric information. For instance, you can have numeric in

Create a procedure - vbscript, Each piece of data is passed in your process...

Each piece of data is passed in your process using an argument. Arguments serve like placeholders for the data you wish to pass into your process. You can name your arguments along

Use serialize function in document class to implement file, USE OF SERIALIZ...

USE OF SERIALIZE FUNCTION IN DOCUMENT CLASS TO IMPLEMENT FILE void CStoreDoc::Serialize(CArchive& ar) { if (ar.IsStoring()) { // TODO: add storing code here }

Associating toolbars for the menu - visual basic, Associating Toolbars for ...

Associating Toolbars for the menu: 1. Insert the tool bar control to your form. 2. Now follow the steps to append the tool bar control to your form. 3. Then, Right Click

Vb program for simple image processing, A program needs to be written that ...

A program needs to be written that is capable of simple image processing. All the images that are available for you to use, can be found on Blackboard in the Assignments section. T

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd