Skip to Content
avatar image
Former Member

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

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>
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers