AppActivate Error

M

MetteHD

I have a Word-document which contains a userform. By clicking om
commandbuttons in this form the current userform hides and open another one.
This works fine!

BUT, with the second userform that opens I want the focus to be at the
document and not at the userform (this userform is set to modal 0).

I am running this application on Office XP and Windows XP, and switch
between to different computers with the same OS and Office versions. The
problem doesn't occure every time on both computers, but seems to occure
whenever it wants to. Therefor it's very difficult to find the solution to
the problem.

I have tried these commands in the code of the commandbuttons, hiding the
first userform and when initializing the second userform:

1.
frmTilbakeSkjema.Show 0
AppActivate Application.Caption

2.
frmTilbakeSkjema.Show 0
AppActivate ("Microsoft Word")

3.
AppActivate Application.Caption

4.
AppActivate ("Microsoft Word")

Like I said - sometimes it works fine with either of the alternatives, and
sometimes not.

SO....Please help? :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top