So I have some code which uses xlwings for writing data in Excel file, xlsm.

after i've done writing, I press a certain button to calculate.

sometimes, an error/message pops in the Excel, which is fine, but i want to catch this message to python, and write it later to a log/print it.

also, i need to interact with this message, in this case to press "Ok" in the message box

Attached image of the message box [![image](https://i.stack.imgur.com/D7d0A.png)](https://i.stack.imgur.com/D7d0A.png)