How to run macro With Variable as argument

I am trying to pass arguments in Execute macro activity as i have string values in variables.
Its working when i m passing single variable as a argument.
But its not working while i am trying to pass multiple variables as a parameters.
image

attached activity for multiple arguments is not working.

Hi
Welcome to uipath community
Kindly remove those single quotes
“Test(”""+vMainFilePath+""","""+vMailDraft+""")"

Cheers @vicky1

Hi
Thank you for this, Its work properly.
But now the issue is the macro runs twice with single run of bot after that changes.

Fine
Is that inside a loop…
Cheers @vicky1

No That’s not inside a loop.
Cheers @Palaniyappan

I am facing a similar issue but that is for a single argument.
Could you tell me how have you passed the argument for the variable existing in the macro?
If possible share the code.

Hi @ashutoshkhantwal,

Try below details

Macro Code :- Sub Test(VariableName)
End Sub

thanks vicky but what would be the changes required in the macro?

@ashutoshkhantwal

Macro should be as below code and your value from Bot will pass as parameter which we have initialized in Macro(“Sub Test(VariableName)”).
Value will be stored in (VariableName) variable.

Sub Test(VariableName)
MsgBox VariableName
End Sub

1 Like

got it buddy, thanks.