on 2017 Feb 08 3:15 PM
Hello,
Is there a way to define a timout for BIP sessions created via Analysis for MS Office?
Many thanks in advance!
Best Regards,
Alex
Request clarification before answering.
You can use the below macro within any worksheet module. I admit it's tedious to deploy these on each workbook, but it works until this feature is included. You can adjust the parameters in the constants at the top. You could also change to base it off of different sheet events such as change event.
'VBA timeout code for SAP Analysis for Office
'(hopefully this won't be needed in future versions)
'Insert this code in the one (or more) WORKSHEET modules in a workbook (not a regular module like "Module1")
'Need this variable at the module level to keep track of last click.
Private timeLIMT As Date
'Set this to False to disable a useful alert message
Const showWarningOfSignoff As Boolean = True
'Set Timeout limt for inactivity in seconds
Const secondsFOrTIme As Long = 3600
'You should leave these exact words to alert your users, especially if they are Americans. They will thank you.
Const messageToDisplay As String = "Boom!! You've been booted! This is a feature your administrator asked for!"
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Built by Steven Rider with iTelligencegroup.com
If timeLIMT = 0 Then
'first instance
timeLIMT = TimeSerial(0, 0, secondsFOrTIme) + Now
ElseIf Now >= TimeSerial(0, 0, secondsFOrTIme) + timeLIMT Then 'too long!
Dim gone As Long
On Error Resume Next 'required to avoid error if already logged off
gone = Application.Run("SAPLogOff", True)
On Error GoTo 0 'turn error checking back on.
'optional message after a successful logoff
If gone = 1 And showWarningOfSignoff Then MsgBox messageToDisplay
Else
'reset the time limit
timeLIMT = TimeSerial(0, 0, secondsFOrTIme) + Now
End If
End Sub
'Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 18 | |
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.