Put

ACCPAC Common Controls

AccpacErrors.Put

Adds an error message to the collection.

Sub Put(
  Msg As String,
  Priority As tagErrorPriority,
  [Params As Variant],
  [Source As String],
  [ErrCode As String],
  [HelpFile As String],
  [HelpContextID As Long])

Parameters

Msg

[in] the error message

Priority

[in] the error priority

Params

[in, optional] an array of parameters for the error message if the error message contains string-replacement tokens, or Null if replacement tokens are not used in the error message

The tokens in the error message will be replaced by the specified parameters.

Source

[in, optional] the source of the error

ErrCode

[in, optional] the error code

HelpFile

[in, optional] the help file in which help messages can be found for this error

HelpContextID

[in, optional] the Context ID of the help message

Remarks

The error message could be plain text, or a string with replacement tokens. Replacement tokens take the form %n, where n is a number starting from 1. When replacement tokens are present in the error message, they are replaced by the value in the corresponding position in the Params array.

Use PutRscMsg if the error message comes from an application's server-side language resource file.