Sub ... (Sess)

DaveL485

New Member
Joined
Nov 6, 2009
Messages
25
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-

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!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
It's a macro that is interacting with the SAP(?) object model.
 
Upvote 0

Forum statistics

Threads
1,202,977
Messages
6,052,887
Members
444,608
Latest member
Krunal_Shah

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