Actually writing a code with SAP scripting (a special scripting language for SAP application) in VBA and got to an issue, could you please advise in it?
I would like to assign a content to the variable ErrMes with the following line,
ErrMes = session.findById("wnd/usr/txtMESSTXT1").Text
which is basically a message text on Window 2 in SAP application (wnd), but that might not appear at all in certain scenarios.
Briefly the issue is that if that does not appear in the application then there is nothing to assign to the variable and the VBA code stops. Do you have idea eventually how to handle those exception cases?
Thanks in advance,