NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HxLink DID NOT INITIALIZE

UBound Function

Returns a Long containing the largest available subscript for the indicated dimension of an array.

UBound(arrayname[, dimension])

The UBound function syntax has these parts:

Part Description
arrayname Required. Name of the array variable; follows standard variable naming conventions.
dimension Optional; Long. Whole number indicating which dimension's upper bound is returned. Use 1 for the first dimension, 2 for the second, and so on. If dimension is omitted, 1 is assumed.

Remarks

The UBound function is used with the LBound function to determine the size of an array. Use the LBound function to find the lower limit of an array dimension.

UBound returns the following values for an array with these dimensions:

Dim A(1 To 100, 0 To 3, -3 To 4)

Statement Return Value
UBound(A, 1) 100
UBound(A, 2) 3
UBound(A, 3) 4

See Also

Example

Dim Statement | LBound Function | Public Statement | ReDim Statement

RaiseEvent Statement

Fires an event declared at module level within a class, form, or document.

RaiseEvent eventname [(argumentlist)]

The required eventname is the name of an event declared within the module and follows Basic variable naming conventions.

Arguments

eventname
Required. Name of the event to fire.
argumentlist
Optional. Comma-delimited list of variables, arrays, or expressions The argumentlist must be enclosed by parentheses. If there are no arguments, the parentheses must be omitted.

Remarks

If the event has not been declared within the module in which it is raised, an error occurs. The following fragment illustrates an event declaration and a procedure in which the event is raised.

' Declare an event at module level of a class module
Event LogonCompleted (UserName as String)

Sub
   ' Raise the event.
   RaiseEvent LogonCompleted ("AntoineJan")
End Sub

You can't use RaiseEvent to fire events that are not explicitly declared in the module. For example, if a form has a Click event, you can't fire its Click event using RaiseEvent. If you declare a Click event in the form module, it shadows the form’s own Click event. You can still invoke the form’s Click event using normal syntax for calling the event, but not using the RaiseEvent statement.

Event firing is done in the order that the connections are established. Since events can have ByRef parameters, a process that connects late may receive parameters that have been changed by an earlier event handler.

See Also

Example

Adding an Event to a Form | Adding Events to a Class | Adding Events to Classes | Event Statement | Raising Events from Controls