LibByName Method (Application object)

Searches for a library with the specified name (Name property) among the open libraries of the application. Returns an instance of the Library object corresponding to the found library.

Applies to: Application object

Syntax

[[Set] libRet =] object.LibByName ( libName )

The DocByName method syntax has these parts:

Part Description
object Required. An expression that returns an instance of the Application object.
libName Required. An expression that returns a String value. The name (Name property) of the library being searched.
libRet Optional. A Library type variable.

Remarks

The LibByName method searches for a library with the libName name starting from the first library in the library collection and returns the first found library. That is, if the third and fifth library have the same name, the LibByName method will returns the instance of the Library object that corresponds to the third library. If there is no matching library, the method returns Nothing.