RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 801
- Office Version
- 365
- Platform
- Windows
Hi chaps
I have a userform which contains a couple listboxes within a frame, with buttons below and a JPG above, nothing major. However, every time I load it, the elements are misplaced - the listboxes overlap each other, etc. If I click and drag the Userform window around, it resolves itself.
But my listboxes have selection change code in them. If I select one item on one listbox, the other updates dynamically. When this happens, everything jumbles itself up again, and I have to jiggle the window to sort it out.
I've added this code as per Senor GPT, which hasn't really stopped the Userform window being comically large (which seems to be aonther bug entirely) - To solve THAT bug, I need to go into the actual Userform in the VBA window and press one of the handles to resize the userform, then it snaps back to its proper size. What a mess!!
I'm on office 365.
Anyone got any tricks up their sleeve? TBH This file has two Userforms and they both do this crap, but the one I'm talking about here is way worse for it.
I have a userform which contains a couple listboxes within a frame, with buttons below and a JPG above, nothing major. However, every time I load it, the elements are misplaced - the listboxes overlap each other, etc. If I click and drag the Userform window around, it resolves itself.
But my listboxes have selection change code in them. If I select one item on one listbox, the other updates dynamically. When this happens, everything jumbles itself up again, and I have to jiggle the window to sort it out.
I've added this code as per Senor GPT, which hasn't really stopped the Userform window being comically large (which seems to be aonther bug entirely) - To solve THAT bug, I need to go into the actual Userform in the VBA window and press one of the handles to resize the userform, then it snaps back to its proper size. What a mess!!
VBA Code:
Dim originalWidth As Double
originalWidth = Me.Width
Me.Width = originalWidth + 10
Me.Width = originalWidth
Me.Repaint
I'm on office 365.
Anyone got any tricks up their sleeve? TBH This file has two Userforms and they both do this crap, but the one I'm talking about here is way worse for it.