Module

# OLEParameter

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Use to pass an OLE parameter.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                | Type                               | Read-Only | Shared |
|-------------------------------------|------------------------------------|-----------|--------|
| `PassByref<oleparameter.passbyref>` | `Boolean</api/data_types/boolean>` |           |        |
| `Position<oleparameter.position>`   | `Integer</api/data_types/integer>` |           |        |
| `Type<oleparameter.type>`           | `Integer</api/data_types/integer>` |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                  | Parameters | Returns                              | Shared |
|---------------------------------------|------------|--------------------------------------|--------|
| `Value<oleparameter.value>`           |            | `Variant</api/data_types/variant>`   |        |
| `ValueArray<oleparameter.valuearray>` |            | `Variant()</api/data_types/variant>` |        |
|                                       |            | `Variant()</api/data_types/variant>` |        |

## Constants

> Use the following class constants to set the value of the Type property.
>
> | Name                   |
> |------------------------|
> | ParamTypeBoolean       |
> | ParamTypeChar          |
> | ParamTypeDouble        |
> | ParamTypeNull          |
> | ParamTypeSigned64Bit   |
> | ParamTypeSignedChar    |
> | ParamTypeSignedLong    |
> | ParamTypeSignedShort   |
> | ParamTypeSingle        |
> | ParamTypeString        |
> | ParamTypeUnsigned64Bit |
> | ParamTypeUnsignedLong  |
> | ParamTypeUnsignedShort |

## Property descriptions

<div id="oleparameter.passbyref">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

OLEParameter.PassByref

**PassByref** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the parameter is passed `ByRef</api/language/byref>`. The default is `False</api/language/false>`.

<div id="oleparameter.position">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

OLEParameter.Position

**Position** As `Integer</api/data_types/integer>`

> Allows you to specify which position (1-based index) that you want the parameter to be passed in.
>
> This is akin to named parameters, if you know the position of the parameter within the function that you want to call, you can create an <span class="title-ref">OLEParameter</span> object and set its Position property to achieve the same effect. The default value is 0, which means no positioning.

<div id="oleparameter.type">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

OLEParameter.Type

**Type** As `Integer</api/data_types/integer>`

> Specifies the type of the parameter.
>
> Use the following class constants to specify the type:
>
> | Class Constant         |
> |------------------------|
> | ParamTypeBoolean       |
> | ParamTypeChar          |
> | ParamTypeDouble        |
> | ParamTypeNull          |
> | ParamTypeSigned64Bit   |
> | ParamTypeSignedChar    |
> | ParamTypeSignedLong    |
> | ParamTypeSignedShort   |
> | ParamTypeSingle        |
> | ParamTypeString        |
> | ParamTypeUnsigned64Bit |
> | ParamTypeUnsignedLong  |
> | ParamTypeUnsignedShort |

## Method descriptions

<div id="oleparameter.value">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

OLEParameter.Value

**Value** As `Variant</api/data_types/variant>`

> The value of the parameter. It accepts one-dimensional arrays. It has a getter and setter pair via the `Assigns</api/language/assigns>` keyword.

<div id="oleparameter.valuearray">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

OLEParameter.ValueArray

**ValueArray** As `Variant()</api/data_types/variant>`

> The value of the parameter if the parameter is a two-dimensional array.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="rst-class">

forsearch

</div>

OLEParameter.ValueArray

**ValueArray** As `Variant()</api/data_types/variant>`

> The value of the parameter if the parameter is a two-dimensional array.

## Notes

This code launches Word and draws a curve in a new document.

``` xojo
Var word As New WordApplication
Var doc As WordDocument
Var param As New OLEParameter
Var pts(3, 1) As Variant
pts(0, 0) = 50
pts(0, 1) = 20
pts(1, 0) = 100
pts(1, 1) = 160
pts(2, 0) = 150
pts(2, 1) = 160
pts(3, 0) = 200
pts(3, 1) = 20

param.Type = OLEParameter.ParamTypeSingle
param.ValueArray = pts

doc = word.Documents.Add
doc.Shapes.AddCurve(param)
word.Visible = True
```

## Compatibility

|                       |                       |
|-----------------------|-----------------------|
| **Project Types**     | Console, Desktop, Web |
| **Operating Systems** | Windows               |

<div class="seealso">

`ExcelApplication</api/windows/excelapplication>`, `DesktopOLEContainer</api/user_interface/desktop/desktopolecontainer>`, `OLEObject</api/windows/oleobject>`, `PowerPointApplication</api/windows/powerpointapplication>`, `WordApplication</api/windows/wordapplication>` classes; `OLEException</api/exceptions/oleexception>` error.

</div>
