cancel
Showing results for 
Search instead for 
Did you mean: 

Call EPM Functions (EPMSelectMember) using Excel Button

Former Member
0 Kudos

Hi all,

I am trying to call EPMSelectMember in VBA code but keep on having error.

Below is my Code in VBA, I think I had put the incorrect member.

The member name should be the dimension name ?

Can anyone advise me on what parameter I should pass in the function ?

A sample code would be really appreciated.

Sub Button1_Click()

    Dim b As New FPMXLClient.TechnicalCategory
    
    b.EPMSelectMember("RESOURCE_PLAN","A5")

End Sub

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kang,

If you are trying to access the member name from a cell, you may try not to use the double quotation sign, such as:

EPMSelectMember("RESOURCE_PLAN",A5)

The parameters which you are passing during the call to EPMSelectMember is correct with the assumption that the "RESOURCE_PLAN" is referring to the connection while A5 is the cell which contains the member name which you intend to get.

I assume you understand that the EMPSelectMember is used to retrieve a specified dimension member. So, just for demo purpose, I have modifed the codes to assign the dimension member to another cell for display:


Sub Button1_Click()
Dim strTest As String
strTest = "=EPMSelectMember(""RESOURCE_PLAN"",A5)"
Cells(1, 1).Formula = strTest
End Sub

The written codes are exactly same as how you copy

=EPMSelectMember("RESOURCE_PLAN",A5)

and paste to the excel cell.

Hope the information helps.

Answers (0)