cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to automatically trigger the EPM Logon screen when starting Excel?

Former Member
0 Kudos

My user base is accustomed to having the BPC logon screen show up automatically when they click on a BPC for Excel shortcut.  Is it possible to have the EPM add-in display the logon screen immediately after Excel starts?

So the desired user flow is:

1. User clicks on a specific desktop shortcut / link.

2. Excel starts

3. Immediately after Excel starts - the user would see the EPM log on screen without clicking on anything additional.

Any help would be appreciated.  I have already tried a few attempts at using macros in files but in each case the EPM-Add in does not load before the file is opened which creates an error.  I know it is not that hard to click on the EPM tab and then click on the log on button, but I'm looking for every little thing I can do to smooth this transition for the users.

Thanks,

Jason

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Yigitalp is right, that should be easily done with a macro like that, using the EPM-adidn API.

In order to use, first, set a vba reference to the FPMXLClient. follow steps 1 to 4 from:

Former Member
0 Kudos

Hi Jason,

I have tried to do it with macros and it works well. maybe you should review your macro settings to be sure if it works.

Sub Test_cnt()

Dim xx As New EPMAddInAutomation

xx.Logon

Set xx = Nothing

End Sub

And then I assign this macto to the button that i inserted on excel sheet and save it to desktop.

Hope it helps,

Yigitalp

Former Member
0 Kudos

Yigitalp,

I left out one key piece of information.  My ultimate goal is to have this as a published application within Citrix.  So rather than directly launching the file, I am testing from a command line with: "C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE" "C:\Test\EPM_LogOn.xlsm".  When called this way, the EPM add in does not load prior to Excel running the macro in Workbook_Open.  Do you have a suggestion that would deal with this?

Thanks,

Jason

Former Member
0 Kudos

Try this:


Function AFTER_WORKBOOK_OPEN()
   
    Dim Conn, EnableEPMCheck, SettingSheet
    EnableEPMCheck = True
   
    If EnableEPMCheck Then
   
        On Error GoTo NoEPMAddin:
        Dim ea As EPMAddInAutomation
        Set ea = Application.COMAddIns("FPMXLClient.Connect").Object
        On Error GoTo NoActiveConnection:
        Conn = ea.GetActiveConnection(ActiveSheet)
           
    End If
   
    AFTER_WORKBOOK_OPEN = True

'Error handling-------------------------------
Exit Function
NoEPMAddin:
MsgBox ("There is no SAP EPM-addin detected.")
AFTER_WORKBOOK_OPEN = True
   
Exit Function
NoActiveConnection:
MsgBox ("There is no EPM connection yet. Please login to any connection.")
ea.Logon
ActiveSheet.EnableCalculation = False
ActiveSheet.EnableCalculation = True
AFTER_WORKBOOK_OPEN = True

End Function

Former Member
0 Kudos

Hi Jason,

It should not be problem to open XLSM file with using file path link. I dont think its because of this macro. I guess there is an other problem with EPM Add-in. 
You may review the File>Options and then check if EPM addin is disable or not.
Or there may be security issue with Citrix.


Hope it helps,

Yigitalp

Former Member
0 Kudos

Jef,

Thank you for the suggestion and the detailed code but it is looking like anything macro based may not work due to the order of operations.  What I am seeing is that Excel opens files before the EPM Add-In fully instantiates.  So when launching from a command line, using Workbook_Open gives an error and AFTER_WORKBOOK_OPEN is not executed because the EPM-Add in is not running.  Both approaches work if Excel is running first and then the file is opened.  Did you get a different behavior when using a cmd prompt to open a file?

Thanks,

Jason

Former Member
0 Kudos

Yigitalp,

The EPM add-in installation is enabled and working fine.  I think it is simply due to the order in which Excel does things when called from the command line.  It appears that when called from a cmd line that Excel opens the file first and then finishes loading the EPM add-in.  If you go to a cmd prompt and execute a command like this:"C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE" "<<your path>>\<<your file>>.xlsm" , are you able to have code referencing the EPM add-in execute automatically?

Thanks,

Jason

Former Member
0 Kudos

You're right, I have same behavior when launching Excel first through cmd.

But using just this command worked for me to run the macro:

"C:\StartPage.xlsm"

Former Member
0 Kudos

Hey Jason,

I tried to open it from cmd prompIt and it works fine with the code i wrote above.

I use the following link:

"C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE" "C:\Users\vktYIGITALP\Desktop\BPC_LOGON.xlsm"
Or only the path:C:\Users\vktYIGITALP\Desktop\BPC_LOGON.xlsm

I guess there is something missing with secrity settings of excel. You may review this: File>Options>Trust Center = Trust Center Settings..


Cheers,