Filter Excel using AutoFilter with Multiple Values

Hi
I want to filter excel using auto filter mode.

Here is the code that i have written in VBA or excel marcos.
How to use this code in Uipath using

1.invoke code
2. invoke VBA
3. invoke VbScript.

VBA Code:

Sub Filter()
Dim data_sh As Worksheet
Set data_sh = ThisWorkbook.Sheets(“Sheet1”)
data_sh.AutoFilterMode = False
data_sh.UsedRange.AutoFilter 1, Array(“john”, “Stan”), xlFilterValues
End Sub

Any expert please guide either using any one the three method or it would be great if you can guide for all 3.
This will really help a lot for newbie.
Any expert please look into this.

Hey @gupta.rak1984 this thread might help you How do I use this VBA in uipath - #6 by dheena

Other 2 ways.
any expert please

you can download examples here https://docs.uipath.com/activities/docs/invoke-vba
and here https://docs.uipath.com/activities/docs/invoke-code
There are also guides on UiPath Academy

Do we have this activity @gupta.rak1984? I don’t know.

Usually, Invoke code is to paste the VBScript or VBA and invode VBA is to use VBA as far as I know

There is no such activity called invoke VBA.

Invoke Code - You can run VB.Net code with this activity.
Invoke Macro - you can run VBA code with this activity.

For how to invoke macro, please refer to the following link -

Example available at the end of the link.

Regards,
Karthik Byggari