Hi, i have set up a process as below
but what value should I include in the “Target Workbook”?
Hi @Hengshi_Teo
Can you specify what are you trying to achieve and what is the error that is throwing in Invoke VBA activity.
Regards
invoke vba to be used inside use excel file activity …which would give you option to give excel handle in the workbook field
cheers
Hi @Hengshi_Teo
To make it work, first use the Excel Process scope activity, and within it, place the Use Excel File activity. Inside that, insert the Invoke VBA activity to interact with the Excel file.
Provide the Excel file path in the Use Excel File activity. Any actions you define within the Use Excel File activity will then be performed on the specified Excel file.
Check the below image for better understanding,
Hope it helps!!
Thanks all for the prompt response!
Background:
I wanted to create a bot to open up the Excel file with a few worksheets. Generally, I will need the bot to do:
Solutioning:
I tried the method that @Anil_G and @mkankatala mentioned, so the error has gone. After reading around, I noted that Code file path is referencing the external file so then how do I execute the VBA (vbaCode)?
Appreciate the assistance! Been awhile since i last played around with UiPath
just save the file as .vba or a text file and give the file path
and entry method name should be worksheetexists as in your vba
and click add vba parameter and there give the sheetname you would want to pass
cheers
I need this to be portable
hence that’s why I am trying to embed it within the bot…
the code file can be kept with project files itself so that it can be portable as all files in the project folder are also packed along with other files
cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.