cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

running VBA with help of below code

nagsaikrishna
Newcomer
0 Likes
331

Hi everyone,

i am running wbs code with help of VBA. i have red color hard warning and yellow color soft warning messages.

I have working on below code if wbs is getting yellow warnings  it should check and move on. and if red color hard warnings is pop up it check out and move on.

both warnings should be check out as per wbs warnings functionality .kindly can anyone help me on below code changes .

For iCount = 2 To lnRows

 

 

On Error GoTo Nxt_1 (Hard warning red color)

session.findById("wnd[1]/usr/btnOPTION1").press

session.findById("wnd[2]").Close

session.findById("wnd[1]").Close

session.findById("wnd[0]").sendVKey 3

session.findById("wnd[0]/shellcont/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell").topNode = " 23"

 

On Error GoTo Nxt_1(soft waring yellow color)

session.findById("wnd[0]/tbar[0]/btn[11]").press

session.findById("wnd[1]/usr/btnOPTION3").press

session.findById("wnd[2]").Close

session.findById("wnd[1]/usr/btnOPTION2").press

session.findById("wnd[0]/tbar[0]/btn[11]").press

session.findById("wnd[0]/shellcont/shellcont/shell/shellcont[1]/shell/shellcont[1]/shell").topNode = " 23"

 

 

Nxt_1:

wshData.Cells(iCount, 2).Value = "Posted"


Continue_Loop:


Next iCount

Err_Handler:

'MsgBox "Error", vbOKOnly, "Error"

'session.findById("wnd[1]").sendVKey 0

wshData.Cells(iCount, 2).Value = "Not Posted"


Resume Continue_Loop

 

 

Accepted Solutions (0)

Answers (0)