Link to home
Start Free TrialLog in
Avatar of Roger
RogerFlag for United Kingdom of Great Britain and Northern Ireland

asked on

excel dynamic user form: sometimes form does not update recently changed object property

I have a vba user form where 95% of objects are defined dynamically. It's quite a big form
When adjusting layout, I change an object property in CODE  (eg ctl_checkBox.top = 34), unload the form, and re-initiate it.
But recently, I find that some properties like ctl.top and ctl.caption do not update their display according to the  NEW property value specified in the code (above).

At first I thought I was editing the property of wrong object (hence no change rendered to obj on screen).
However, I found that if, before making the DESIRED change in property, I first set the property to NULL (for .Caption) or a way-out different value for .Top (etc), THEN I got the desired change in property that was specified in the very next line of code.

It seems as though the Form ignored small changes (during editing), and needs a 'jolt' to wake up and take me seriously! Can you give me some top-ideas of possible causes, please. So I can probe about..

QUESTION:
Is there some probable rationale to this? Is this phenomenon 'telling me something' about an error in my approach to dynamic form creation? - I've created many before, but not quite so big.

Thanks, Kelvin
ASKER CERTIFIED SOLUTION
Avatar of Zack Barresse
Zack Barresse
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Roger

ASKER

Thanks, Zack,
That's new to me and very helpful. I'll see how I get on!
Kelvin