Can anyone tell me please, the difference between a normal Macro and for example, this?
Sub ReturnToBaseMenu(Sess) <Its the (Sess) bit thats cot me puzzled.
Full bit of code is-
I have several of these types, in an excel workbook that interfaces with SAP. very interesting, but very complex!
Sub ReturnToBaseMenu(Sess) <Its the (Sess) bit thats cot me puzzled.
Full bit of code is-
Code:
Sub ReturnToBaseMenu(Sess)
Dim I As Integer
'if there are any children window open close all of them (a child window is a sub window of the main screen)
If Sess.Children.Count > 0 Then
For I = 1 To (Sess.Children.Count - 1)
Sess.findbyid("wnd[1]").Close 'Close the second child window until there is only one (wnd[0] is the first one)
Next
End If
'Navigate up one level until we are at the start screen (Sap Easy Access)
While Not Mid(UCase(Sess.findbyid("wnd[0]/titl").Text), 1, 15) = "SAP EASY ACCESS"
Sess.findbyid("wnd[0]/tbar[0]/btn[15]").press
Wend
End Sub
I have several of these types, in an excel workbook that interfaces with SAP. very interesting, but very complex!