Please note that UiPath is more of no code platform having inbuilt activities to perform our automations.
we can use invoke code and write our own VB or macro code if we have any complex automations related to excel.
i feel this is very simple requirement not sure why do you require VB Code for this requirement. You could implement by using simple work flow in UiPath.
Using Get work sheets activity to get the sheets and use if condition to control which sheets we have to work on.
Use for each loop to loop the sheet names and use Append range and write range to merge the data into summary sheet.
I have created sample work flow attached. please refer and let us know. thanks.