Rearrange worksheet elements - eg Buttons / Comboboxes etc.

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Rearrange worksheet elements - eg Buttons / Comboboxes etc.

    Hi there,

    I need some help on changing for example the location of a specific workbook element by using a macro. What I want to achieve, is that a button moves dynamically to the last entry of a list. The list is created by another macro, so it should be no problem, to read the height of every line, sum it up, and set that value as the new location of the button. The reason is, I want to unlock the cells if a user needs to enter a new line and pass on some formulas in some hidden colums.

    I am relativley new to php-coding but tried almost every combination of the Macro Engine API found in the manual from pages 96-101.

    For example:

    Activesheet()->elements()-count(); -> works, for every button I add it increments the number, but I was unable to focus the button itself, neither to read or set any property of the button.

    Maybe someone knows what specific line of code is needed to retrieve the position of a button, checkbox or combobox. The "id" of the button in the source code, seems to be calculated dynamically, so i was unable to do something like getElementbyId().

    I found one very interessting postdescribing to use hyperlinks for similar issues as a workarround, but maybe someone knows how to do it by manipulating the properties of the workbook elements itself.

    Thanks in advance for every hint.

    Greets, Peter.
  • Hi HojTad,

    I am talking about the admin guide manual, on the Jedox website for the Jedox Suite. You need to register and after this you have access to the download section, where should be able to find it.

    The manual includes all api functions, but there are only some examples that didn't help me enough. I am a newbie to php programming myself as I stated above.

    Hopefully I was able to help.

    Greets Peter

    The post was edited 2 times, last by Peter Parks ().

  • This functionality would be indeed handy but unfortunately its not possible to set the position & size of form element by macro.

    Have you considered using 'dynamic range' with formula? ( formula populates the vertical rows)
    below the dynamic range add button - so your button will be always below the last row.

    Best regards,