Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Script - Handle Error - VBA

Former Member
0 Kudos

Hi,

I'm having difficulties to set up my VBA code in order to handle error.

I'm using it to create data and the system send back the error : 'entry already exists'. I would like to set up something like this :

(See bold)

session.findById("wnd[0]/usr/ctxtBNKA-BANKS").Text = BANKS
session.findById("wnd[0]/usr/ctxtBNKA-BANKL").Text = BANKL

IF session.findById("wnd[0]").sendVKey 0 Sends back an error then

Stop script

End if


session.findById("wnd[0]/usr/txtBNKA-PROVZ").Text
session.findById("wnd[0]/usr/txtBNKA-PROVZ").Text = PROVZ
session.findById("wnd[0]/usr/txtBNKA-BANKA").Text = BANKA
session.findById("wnd[0]/usr/txtBNKA-STRAS").Text = STRAS
session.findById("wnd[0]/usr/txtBNKA-ORT01").Text = ORT01
session.findById("wnd[0]/usr/txtBNKA-BRNCH").Text = SWIFT
session.findById("wnd[0]/usr/txtBNKA-SWIFT").Text = BANKL
session.findById("wnd[0]/tbar[0]/btn[11]").press

Do you have any idea ? I having issue when using 'onerror'.

Thanks,

Martin.

0 REPLIES 0