cancel
Showing results for 
Search instead for 
Did you mean: 

EPM10 OpenDimensionAndMemberSelector

Former Member
0 Kudos

Hi

I'm trying to open the context member selector pop-up window through a vba button on my excel worksheet.

I've managed to step successfully through the code, however I can't get the function to do what it's supposed to be doing? Am I missing any extra parameters i.e. what additionally should I amend to the piece of code to open up the TIME dimension context member selector through my code?


Dim EPM10 As New FPMXLClient.EPMAddInAutomation
EPM10.OpenDimensionAndMemberSelector(EPM10.GetActiveConnection(ActiveSheet))

Any help in this regard will be appreciated.

Thanks

Ryno

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I'm not totally sure what the intention of OpenDimensionAndMemberSelector is.

But, I think you can probably do what you want to do with the following:

Dim ea As New EPMAddInAutomation

Dim selectd As String

selectd = ea.OpenMemberSelector(ea.GetActiveConnection(ActiveSheet), "TIME", ea.GetContextMember(ea.GetActiveConnection(ActiveSheet), "TIME"))

If InStr(1, selectd, ";") > 1 Then

ea.SetContextMember ea.GetActiveConnection(ActiveSheet), "TIME", Left(selectd, InStr(1, selectd, ";") - 1)

Else

ea.SetContextMember ea.GetActiveConnection(ActiveSheet), "TIME", selectd

End If

ea.RefreshActiveSheet

The code above brings up the member selector dialog for TIME - with the current context member selected. When you click OK, it puts the selected member(s) in the variable "selectd". If there are multiple members selected, then they are separated by ";"s. So, the code above sets the context to the first member in the selection list.

Steve

Former Member
0 Kudos

Thank you very much Steve - this is exactly what I was looking for.