Hi,
is there a possibility to create VBA Macro to execute when somebody clicks on the refresh button in BO?
thank you
donzigante (BOB member since 2009-08-18)
Hi,
is there a possibility to create VBA Macro to execute when somebody clicks on the refresh button in BO?
thank you
donzigante (BOB member since 2009-08-18)
You can use the built-in BeforeRefresh() event handler. Put your VBA code in that subroutine and it will excecute the code prior to a document refresh (i.e. when the user clicks refresh).
jresendez (BOB member since 2004-05-03)
I’m using BO 6.5 and when I use this BeforeRefresh event is not working.
Private Sub Document_BeforeRefresh(Cancel As Boolean)
Application.Interactive = False
Dim startTime As Date
Dim endTime As Date
startTime = Now - 10
endTime = Now - 4
ThisDocument.Variables(“Start Time:”).Value = BAFunctions.CurrentHour(startTime)
ThisDocument.Variables(“Stop Time:”).Value = BAFunctions.CurrentHour(endTime)
End Sub
donzigante (BOB member since 2009-08-18)
Sorry I was puting the event in a module and I guess that was wrong. The event is working.
donzigante (BOB member since 2009-08-18)