You are not logged in.

Dear visitor, welcome to Palo Community Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

rapid

Master

  • "rapid" started this thread

Posts: 39

Date of registration: Jun 24th 2008

  • Send private message

1

Tuesday, June 24th 2008, 10:36am

Pop-up box for element-selection via VBA

Hello, I started working with palo some days ago. Now I'm searching for a possibility to open the pop-up box for element selection via VBA (the box, that appears if I make a double click on an element field). Something like

Range("A2").Select
Application.DoubleClick

didn't work. Could anybody help me?

Thanx a lot

  • "h_decker" is male

Posts: 763

Date of registration: Oct 26th 2005

Location: Cologne, Germany

  • Send private message

2

Tuesday, June 24th 2008, 10:49am

RE: Pop-up box for element-selection via VBA

Hi,
first set a VBA reference on the "Jedox.Palo.XlAddin.tlb". You find it in e.g. "c:\program files\Jedox\Palo\". Here is a function you can use for showing the element selector. It returns the selected element name.

Public Function getElementBySelection(serverdb As String, Dimension As String)

'e.g. try a call with "localhost/Demo" as serverdb and "Products" as dimension

Dim obj As Jedox_Palo_XlAddin.IPaloEngineCom
Set obj = New Jedox_Palo_XlAddin.ComInterface

getElementBySelection = obj.ChooseElements(serverdb, Dimension)


End Function

Holger

This post has been edited 1 times, last edit by "h_decker" (Jun 24th 2008, 10:49am)


rapid

Master

  • "rapid" started this thread

Posts: 39

Date of registration: Jun 24th 2008

  • Send private message

3

Tuesday, June 24th 2008, 11:27am

RE: Pop-up box for element-selection via VBA

Hi Holger,
many thanks for your help. It seems to work fine. Now I have the following question about the VBA reference to the tlb-file:

Normally, users don't have this reference in Excel/VBA. How can I implement this that users get this reference automatically when they start the excel file (or the function). And how can I get dynamically the program path of Jedox Palo, where I find this tlb-file (e.g. from a registry-key. Not all users have the same Palo-programpath. So I can't use a fixed string).

Thank you for your help :)

  • "h_decker" is male

Posts: 763

Date of registration: Oct 26th 2005

Location: Cologne, Germany

  • Send private message

4

Tuesday, June 24th 2008, 11:46am

RE: Pop-up box for element-selection via VBA

Usually Excel tries to restore the reference if it can find it. But of course you can set it by your own using application with e.g.

ThisWorkbook.VBProject.References.AddFromFile ...
or
ThisWorkbook.VBProject.References.AddFromGuid ...

You find information about palo path e.g. in HKEY_USERS\.DEFAULT\Software\Jedox\Palo\XlAddin

Holger

rapid

Master

  • "rapid" started this thread

Posts: 39

Date of registration: Jun 24th 2008

  • Send private message

5

Tuesday, June 24th 2008, 1:16pm

RE: Pop-up box for element-selection via VBA

Thank you for this information. I think, now I can work forward.

One little detail question: it's possible, to select a default element in the pop-up box for element-selection? I like to select the element in the box, which was given to the report by the last selection.

Thank you very much

  • "h_decker" is male

Posts: 763

Date of registration: Oct 26th 2005

Location: Cologne, Germany

  • Send private message

6

Tuesday, June 24th 2008, 1:19pm

RE: Pop-up box for element-selection via VBA

Sorry, no idea. May you could at least check the result for an empty string so that user is not able to choose nothing and take the last value instead.

This post has been edited 2 times, last edit by "h_decker" (Jun 24th 2008, 1:24pm)


rapid

Master

  • "rapid" started this thread

Posts: 39

Date of registration: Jun 24th 2008

  • Send private message

7

Tuesday, June 24th 2008, 2:01pm

RE: Pop-up box for element-selection via VBA

...or is there a possibility to set a doubleclick on a cell per vba (Application.DoubleClick doesn't work)? When I do a doubleclick manually, the 'old' element in the pop-up box is marked. I'd like to mark the actual element that's selected in the report per vba (so that if the user presses the 'OK'-Button without a selection before, the correct element will be choosen and the user will have a better orientation when the active element is marked).

Or if you have a workaround, please let me know.

Thank you.

Liv

Beginner

  • "Liv" is female

Posts: 1

Date of registration: May 17th 2011

  • Send private message

8

Tuesday, May 17th 2011, 11:20am

RE: Pop-up box for element-selection via VBA

Goodday,

My question might sound a little bit strange to you but could you please explain to me how to set the VBA reference as written below:

"first set a VBA reference on the "Jedox.Palo.XlAddin.tlb". You find it in e.g. "c:\program files\Jedox\Palo\". Here is a function you can use for showing the element selector. It returns the selected element name.
(written by h_decker)".

An step by step example would be great!

Sorry I'm a newbie! :rolleyes:

Thanks a lot!
Liv

  • "h_decker" is male

Posts: 763

Date of registration: Oct 26th 2005

Location: Cologne, Germany

  • Send private message

9

Tuesday, May 17th 2011, 3:49pm

RE: Pop-up box for element-selection via VBA

Hi,
open Excel VBA Editor. e g. via ALT+F11. Then choose Tools in Dropdownmenu. There should be a menue ntry entry called References. In german Excel VBAS its Menu "Extras" and "Verweise". Then browse for the explained file.
Hope that helps.

Holger

Rate this thread