Skip to Content
Former Member
Dec 07, 2007 at 02:06 PM

VBA Macro SetFilter


Dear all,

I am trying to use the BExapi SAPBEXsetFilterValue in BEx 7.0 and get the error 1004: "Unable to get the Intersect property of the Application class".

The code is the following:

Sub test()

Call SAPBEXsetFilterValue("Sales")

End Sub

Public Function SAPBEXsetFilterValue(intValue As String, Optional hierValue As String, Optional atCell As Range) As Integer

If atCell Is Nothing Then Set atCell = Application.ActiveCell

Dim pAddin As Object

Set pAddin = CreateObject("")

SAPBEXsetFilterValue = pAddin.SAPBEXsetFilterValue(ActiveWorkbook.Name, intValue, hierValue, atCell)

End Function

Does anyone know how I can fix the problem?

Thanks a lot in advance,

Rainer Sigg