# ModuleOpened (BlueArrow)

{% hint style="info" %}
Note: We recommend using the [BlueArrowArguments ](bluearrowarguments)approach instead of this one.&#x20;
{% endhint %}

The code written in this section specifies the fields which are passed as arguments to modules opened with the use of _Blue Arrows_, so the module will make the arguments needed for a retrieve at opening.

For modules having no arguments, or module which don’t need to do a retrieve, the below code is not needed.

There are two possibilities of passing the module to the control:&#x20;

* specify the moduleID in the “BlueArrow Module” property of the control

![](https://2522353545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXf5GuikRIHooatf_sm%2F-MXkK4BRiSoqzm4z2776%2F-MXkM1K-W1oaSf8iZcdt%2FModuleOpened_BlueArrow_1.png?alt=media\&token=bec2051d-2c39-4225-a442-739a6b154be9)

* passing the moduleID in the ModuleOpened WHO-Method. In this case, an empty string (space) will represent the moduleID

![](https://2522353545-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXf5GuikRIHooatf_sm%2F-MXkK4BRiSoqzm4z2776%2F-MXkMGXxbz-83kC1wR_j%2FModuleOpened_BlueArrow_2.png?alt=media\&token=ee5aaa71-0b0b-4e4f-b6a8-ce03b6da84b3)

```csharp
public override void ModuleOpened(FrameworkElement source, xWHOModule newModule)
{
    base.ModuleOpened(source, newModule);

    if (source.Name == tbsBetriebsauftrag.Name)
    {
        OpenCurrentBetriebsauftrag();
    }
    else if (source.Name == tbBabWz.Name)
    {
        OpenCurrentWerkzeug();
    }
}
```

```csharp
public virtual void OpenCurrentWerkzeug()
{
    if (SelectedBabRow == null) return;

    ModuleCaller.Open.Res(SelectedBabRow.wz);
}
```
