Option Strict On disallows late binding in Invoke Code

Hello all,

I have been wasting my time looking into a single issue from last two days. Can anyone help me please resolving the issue.

I’m trying to pivot the table in excel using Invoke Code activity. when i try to run the code in Visual studio it is running perfect without any issue. But when i copy the same code in UIPath Invoke Code Activity, it is giving the error as “Option Strict On disallows late binding”.

Dim i As GenericValue = 1

For i = 1 To oPivotField.PivotItems.Count
If oPivotField.PivotItems(i).Value.ToString() = “GLR” Then
oPivotField.PivotItems(i).Visible = True
Else
oPivotField.PivotItems(i).Visible = False
End If
Next i

this is the part of code where i’m getting error.

Please help me with this issue. Attached the workflow

Invoke.xaml (19.6 KB)

Regards,
HareeshMR

Hi Team,
I find solution by converting each variable values using C Type conversion

Thanks,
MR

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.