Enable Analysis Office Addin

Before you can use Analysis Office with Visual Basic for Application, you have to load the Analysis Addin. The code for this is in Analysis Office 1.4:

Private Sub EnableAnalysisOffice()

Dim addin As COMAddIn

For Each addin In Application.COMAddIns

If addin.progID= "SBOP.AdvancedAnalysis.Addin.1" Then

If addin.Connect= False Then addin.Connect= True

End If

Next

End Sub

 

In Analysis Office 2.0, SAP has changed the name of the addin. The command is now:

 

Private Sub EnableAnalysisOffice()

Dim addin As COMAddIn

For Each addin In Application.COMAddIns

If addin.progID= "SapExcelAddIn" Then

If addin.Connect= False Then addin.Connect= True

End If

Next

End Sub

 

Now you can continue working with the SAP Analysis commands.

Write a comment

Comments: 0