Skip to Content
0

Use if ..End If condition in SAP VBA Macro.

Oct 06, 2017 at 02:56 PM

46

avatar image
Former Member

Dear Expert,

I am trying to use If.....End If condition in a macro which extract some report from SAP. I have assigned a value to a variable & want to give condition that SAP should select the report according the to variable but it doesn't work. Can anybody check & advise me if I am going wrong or any other functions or conditions I can use for it. Following are my codes.

<strong>If Oper_Conc = A Then session.findById("wnd[0]/shellcont/shell").doubleClickNode "000000001049"
End If <br></strong><strong>If Oper_Conc = B Then session.findById("wnd[0]/shellcont/shell").doubleClickNode "000000001019"
End If <br></strong><strong>If Sheets("Main").[B4] = C Then session.findById("wnd[0]/shellcont/shell").doubleClickNode "000000001019" <br></strong><strong>End If</strong>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers