Getobject Function - Teklynx Discover ActiveX Programmer's Manual

Table of Contents

Advertisement

Discover ActiveX Automation for your labeling software
GetObject
function
Note
Note
For example, you can define and create the reference using the
code below:
Dim MyApp As Lppx2.Application
Set MyApp = CreateObject("Lppx2.Application")
The variable reference creating an early bind increases the
performance but must only contain one reference.
This function returns a reference to an ActiveX object from a file.
Syntax
GetObject([pathname],[server name])
The syntax of the GetObject function includes the following
arguments:
Item
pathname
servername
Use the GetObject function to access an ActiveX object from a
file and to assign this object, an object variable. Use the Set
instruction to assign the object that is returned by the GetOb-
ject function at the object variable (see below).
Below are several examples showing the variations of the
GetObject syntax.
Dim MyDoc As Object
Set MyDoc = GetObject("c:\ProgramFile\document.lab")
When this code is executed, the application associated with the
pathname argument is launched and the object included in the
file is activated.
In the case where the server automation is already loaded in
the system memory, the ActiveX mechanism selects it, then the
document is activated.
Chapter 1 -- 5
Description
Optional. Variable of Variant
type (String). Complete path-
name with the name of the
file containing the object to
get. If you don't define the
pathname, you have to define
the server name.
Optional. Variable of Variant
type (String). Name of the
application that gives the
object.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents