Lukket

fix my macro, vba and sap gui scripting error handling

hello,

I'm new to vba and sap gui scripting, could someone point me into the right direction please?

I think I have a problem with the error handling statement maybe. it supposed to put the icon value(Green per example) in column C if there is any and to leave column C empty and put "No icon " on column B and then go to the next cell and check again if there is an icon or now.

I have a list of element in excel (Column A) that I want to check in sap and instead of checking one by one manually I'm working on a macro to check all the items on excel and returns the value of the icon (if green in sap, it should return the icon value and put it on column "C") if it doesn't find the icon it should put the value : no icon found on column "B".

I tried to put on error resume next but the problem is that it only work once and then it start puting the same value in column C and B regardless if there is a green icon or not.

if I don't put in error handling method, once there is no icon, vba shows that the problem is on the below line:

[Code]

[login to view URL]("wnd[0]/usr/tblSAPDV70ATC_NAST3").[login to view URL](0).Width = 4

but when I do the following it works properly (puts "no icon" )and end exit the macro:

[Copy to clipboard]

'=====================Column A contains the Numbers I want to check on sap

on error goto msg

For Each rng In Columns("A").[login to view URL](xlCellTypeConstants)

Elements= Cells([login to view URL], "A").Value

If [login to view URL] Like "?56*" Then

'============================================

[login to view URL]("wnd[0]").maximize

[login to view URL]("wnd[0]/tbar[0]/okcd").Text = "/nvf03"

[login to view URL]("wnd[0]").sendVKey 0

[login to view URL]("wnd[0]/usr/ctxtVBRK-VBELN").Text = Elements

[login to view URL]("wnd[0]/usr/ctxtVBRK-VBELN").caretPosition = 10

[login to view URL]("wnd[0]").sendVKey 0

[login to view URL]("wnd[0]/mbar/menu[2]/menu[0]/menu[3]").Select

[login to view URL]("wnd[0]/usr/tblSAPDV70ATC_NAST3").[login to view URL](0).Width = 4

[login to view URL]("wnd[0]/usr/tblSAPDV70ATC_NAST3/lblDV70A-STATUSICON[0,1]").SetFocus

[login to view URL]("wnd[0]/usr/tblSAPDV70ATC_NAST3/lblDV70A-STATUSICON[0,1]").caretPosition = 0

[login to view URL]("wnd[0]").sendVKey 2

[login to view URL]("wnd[0]/usr/tblSAPDV70ATC_NAST3").[login to view URL](0).Width = 4

[login to view URL]("wnd[0]/usr/tblSAPDV70ATC_NAST3/lblDV70A-STATUSICON[0,1]").SetFocus

[login to view URL]("wnd[0]/usr/tblSAPDV70ATC_NAST3/lblDV70A-STATUSICON[0,1]").caretPosition = 0

Value = [login to view URL]("wnd[0]/usr/tblSAPDV70ATC_NAST3/lblDV70A-STATUSICON[0,1]").IconName

[login to view URL]("wnd[0]/tbar[0]/btn[3]").press

[login to view URL]("wnd[0]/tbar[0]/btn[3]").press

[login to view URL]("wnd[0]/tbar[0]/btn[3]").press

Cells([login to view URL], "C") = value

End If

Next

msg:

cells([login to view URL], "D").value = "No icon"

End Sub

[\code]

Evner: SAP, Excel VBA

Se mere: unix scripting file handling, sap gui, linux script error handling, ftp script error handling, sap gui scripting, linux ftp scripting error handling, fix cross site scripting error computer, unix scripting error handling, sap excel macro vba, cross site scripting error fix, fix macro error word 2013, Vba,Sap scripting , vba error handling best practices, vba error handling in loop, ms access vba error handling example, poor error handling overly broad catch fix, access vba error handling, vba type mismatch error handling, sap gui scripting vba, fix scripting error

Om arbejdsgiveren:
( 2 bedømmelser ) Lodz, Poland

Projekt ID: #21878689

6 freelancere byder i gennemsnit $41 på dette job

schoudhary1553

Hello Sir, I am expert who understands the value of time. I pride myself in my attention to detail. I am very hard working and aim to deliver in less time than quoted. I want to make you, my employer happy without cha Flere

$100 USD in 2 dage
(16 bedømmelser)
5.1
ksriniravi

Greetings! Please try these 2 changes together and let me know the results. 1) Add "Resume Next"as below just before End Sub cells([login to view URL], "D").value = "No icon" Resume Next End Sub 2) Add On Error Goto 0 just Flere

$15 USD på 1 dag
(14 bedømmelser)
4.3
dgled

Hi, I am financial experts and a guru in Excel with extensive knowledge and expertise in advanced formulas, Pivot Tables, Tables, and Visual Basic Application including preparation of available interfaces, dynamic dash Flere

$50 USD in 7 dage
(5 bedømmelser)
5.0
likwun

It's better to send the Excel source file to have a look. It's more convenient to find problems. Of course, sensitive information in the file can be processed.

$20 USD på 1 dag
(0 bedømmelser)
0.0
nicoleguan3

Hello, I’m a full time Excel data analyst. Please contact if you are interested. Have a great day and thank you.

$30 USD på 1 dag
(0 bedømmelser)
0.0
harsh2112

I have good experience with sap gui with excel macro and vb script more then 4 years.

$30 USD in 5 dage
(0 bedømmelser)
0.0