Sap vba help...on error resume

shane5150

New Member
Joined
May 29, 2018
Messages
1
Hi everyone,
I'm needing help with my code when SAP tables return no results. Currently it works when there is data but if there's no data is just stops without finishing. I have no idea how to fix this. I've read some posts saying I need to add an On Error Resume code but not sure how to do that. I'm getting an error on line 4. How do I write code that tells it to continue to the end of the script? Any help is greatly appreciated. Thank you.
Code:
 [/INDENT]
[INDENT]session.findById("wnd[2]/tbar[0]/btn[8]").press[/INDENT]
[INDENT]session.findById("wnd[1]/tbar[0]/btn[0]").press[/INDENT]
[INDENT]session.findById("wnd[0]/tbar[1]/btn[8]").press[/INDENT]
[INDENT]
[/INDENT]
[INDENT][COLOR=#ff0000]session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell").setCurrentCell -1, ""[/COLOR][/INDENT]
[INDENT]
[/INDENT]
[INDENT]session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell").SelectAll[/INDENT]
[INDENT]session.findById("wnd[0]/mbar/menu[5]/menu[2]/menu[1]").Select[/INDENT]
[INDENT]session.findById("wnd[1]/usr/cntlGRID/shellcont/shell").currentCellRow = 6[/INDENT]
[INDENT]session.findById("wnd[1]/usr/cntlGRID/shellcont/shell").selectedRows = "6"[/INDENT]
[INDENT]session.findById("wnd[1]/usr/cntlGRID/shellcont/shell").clickCurrentCell[/INDENT]
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top