Forum Discussion
When inserting or deleting a row the form controls and ActiveX controls are moved.
In this case you want the ActiveX element to adjust the check box to the height of the picture and not to the line. At the same time, these should remain in the same line number.
Maybe it could be done with VBA code, but it is time consuming. Time that I cannot provide at the moment.
What I could also recommend you make the same settings ...
- Control element, right mouse button, "Format control element ..."
2Click on "Properties"
Object positioning
- Click on the selection point "Dependent on cell position and size". Press "OK".
... also with the pictures regardless of the check boxes, so pictures and check boxes will move at the same time.
Thank you for your patience and understanding
Hi, NikolinoDE
Thank you for your efforts. I already have the "Dependent on cell position and size" configuration on properties...
It is very strange because, without changing anything, the excel behaviour changed from one day to another. I even tried to roll back windows actualizations and nothing changed... weird.
Finally, I found how to hack this strange behaviour with a VBA macro. I'll share here for the ones that have the same problem:
1) First of all, I found that if I selected one form control on design mode and I simply moved it up and down, when I left design mode it had recovered its functionality and no longer appeared duplicated or moved after saving the Excel archive. It makes the behaviour even weird, I know... but it solves that.
2) To make it easier to move all the form controls that were affected by the strange behaviour at once, I selected them and with right click, I had chosen to group them. Doing this, Excel, automatically creates a name for the group of items. In this case the name was "Group 22".
3) To automate the process, I added this to a macro:
ActiveSheet.Shapes.Range(Array("Group 22")).Select
Selection.ShapeRange.IncrementTop -0.5
Selection.ShapeRange.IncrementTop 0.5
This code selects the group of form controls, and move them to the same position (the previous one, disappearing the duplicate form control on the new position).
I would prefer to avoid that, but it's the only solution I had found. If anyone have a better option, please, share it.
Thank you