
UserForm updating a 2nd UserForm?
Can I jump in here with a question?
We have an application which relys upon reactivation of the first userform
when the second one is unloaded. Works fine in Word97, but not in Word2000.
Has anyone any experience of how to force reactivation? We have tried hiding
and then reshowing form 1 but our client complains this creates a visible
flash which he objects to.
Also which of the two Words is doing the 'right' thing? We will have to
rewrite if it isn't just a bug in Word 2000.
Any help would be appreciated.
Cheers
Anna
Quote:
Quote:
> If you really mean activate as opposed to formload, activate has nothing
to
> do with loading or unloading. It is the act of bringing it to top and
giving
> it focus. Load and Unload actually relate to the form object itself and
its
> state in memory. While a by-product of unloading is that the form
> disappears, this is not the same as deactivating.
> To recap activation refers to the window state, loading/unloading refers
to
> the state of the form object in memory.
> Pete
> --
> > Excellent. This worked great. I had no idea that the original Form would
> be
> > "activited" again since it was not explicitly unloaded.
> > Thanks again.
> > Tony.
> > > Hi Tony,
> > > you probably have some code in the userform_activate event of the
first
> > > userform that sets the text in the field.
> > > in this activate event try something like this
> > > private sub userform_activate
> > > static allreadyactivated as boolean
> > > if allreadyactivated then exit sub
> > > 'other existing code goes here
> > > allreadyactivated=true
> > > end sub
> > > if this doesn't help, post back with more specifics and code please
> > > greetings, pieter.
> > > > Hello,
> > > > I have two User Forms. The 2nd is opened from a button on the 1st
> form.
> > I
> > > > want to populate data entered on the 2nd form into a text field on
the
> > 1st
> > > > form.
> > > > However, as soon as I unload the 2nd form, the 1st form (updated
with
> > the
> > > > right information) reverts back to its previous state, as if being
> > > > reinitialized with its default field values.
> > > > Can anyone PLEASE help me with this?
> > > > Thanks
> > > > Tony.