Macro error: User defined type not declare

I want to send value sheetName , pathfile from uipath to macro
but error.

Variable in UIPath = sheetName and pathfile


Please guide me about it. (I’m a newbie in Macro)

@fairymemay You need to create a Function not Sub and that function will have 2 parameters Function(sheetName, pathofFile). It may resolve your issue.

@Arpit_Kesharwani Now: New error.

Guide me please.