Get the App
SLTechnology News&Howtos  ›  Development  › 

The usage of Number attribute in VBS

Shulou Source: shulou.com Published: 2022-06-03 19:37:50 11月12日 Update

This article introduces the knowledge of "the use of the Number attribute in VBS". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Returns or sets a numeric value assignment error. Number is the default property of the Err object.

Object.Number [= errornumber]

Parameter object

Err object.

Errornumber

An integer that represents a VBScript error number or a SCODE error value.

Description

When a user-defined error is returned from the Automation object, the selected number is added as an error code to the constant vbObjectError to set the Err.Number.

The following code illustrates how to use the Number property

On Error Resume NextErr.Raise vbObjectError + 1, "SomeObject" generates an object error # 1.MsgBox ("Error #" & CStr (Err.Number) & "& Err.Description) Err.Clear 'clears the error. This is the end of the introduction to" the use of the Number attribute in VBS ". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Errors attributes objects code content more knowledge practicality learning next parameters dilemmas actual constants situations numeric values numbers integers articles cases Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Xiaomi MySQL Linux NVidia