MessageBox value will store on Excel sheet

Hi, can anyone help me into this, I want messagebox value will store in excel file every time i run the process .Please suggest some solution.
while running this process i am getting an error like [For Each: Collection was modified; enumeration operation may not execute.
Here i am attaching my SS:-

What is datatype if MessageOP @Anjali_Rani

Hi, i am attaching my Xaml file,here i need after every time execution of for each loop , the message box value will inserted on excel file in new row.Please find the xaml file.
exMessageBox.xaml (11.2 KB)

Hi @Anjali_Rani

You can check this way

MessageBox.xaml (7.7 KB)

Actually the message variable will store the button u had pressed not the message in variable. It is better to save the message in variable then use add add datarow to add the data to datatable

And finally out of loop, use write range to write the data

Hope it helps you

Mark it as solution if it resolves ur query

Regards

Nived N

Happy Automation

I am not understanding how can i store the message in variable and then add it to data row?Please explain i am very new to uipath,so i have confusion?
Can you please xaml for this, so every time the message box “message” will append in excel.

Please check the xaml fike I shared above

i am tried tis and getting an error:-


Try directly with the same workflow

It will work for u