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

Vb.net applications, outline and explain in detail any 10 applications of v...

outline and explain in detail any 10 applications of vb.net

Introduction to gui design and file handling, INTRODUCTION TO GUI DESIGN AN...

INTRODUCTION TO GUI DESIGN AND FILE HANDLING   The aim of the user interface design is to attain the user's goals. When the user's goals are met, the user is satisfied and the

John Galt requests a program to double-check his Gas Bill, John''s gas supp...

John''s gas supply is read from a 4-digit meter each month that shows the current total gas used in cubic meters. The amount of gas used that month is determined by subtracting t

Record set - database applications, Record Set: The record set present...

Record Set: The record set presents the records in a base table or the records retrieved due to the query. The record set falls into 3 classes. These are table type record set

Help file property, Sets or returns wholly qualified path to a Help File. I...

Sets or returns wholly qualified path to a Help File. If Help file is indicated in HelpFile, it is called automatically when the user clicks Help button (or presses the F1 key) in

Adding records - data control, Adding Records: 1. As in the earlier ca...

Adding Records: 1. As in the earlier case Set the DatabaseName property as "C:\ex.mdb", now Set the Record Source for the data control as Customer and Set the Record Type to 0

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

Architecture of win 32 program, ARCHITECTURE OF WIN 32 PROGRAM   ...

ARCHITECTURE OF WIN 32 PROGRAM   Figure: working of Win 3 program The hardware events in the figure are the mouse associated events like the mouse move, left

Dictionary, how to make dictionary in vb using ms access

how to make dictionary in vb using ms access

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