Form becomes active window but won't accept input with Wizard running behind it 
Author Message
 Form becomes active window but won't accept input with Wizard running behind it

Hi Ian,

Quote:
> However, if I assign a keystroke combination to the macro so that I can run
> it after calling up the "Envelopes and Labels" tool, the form pops up and
> becomes the active window, but won't accept input (it just dings back at me
> whenever I click anywhere).

Both Envelopes and Labels and Word VBA UserForms are "modal" - only they can
have the focus. I'd guess what you want to do is causing a conflict:
Envelopes and Labels doesn't have the focus, due to your form; but your form
can't work, either. Word and its dialogs and forms don't work like the Access
environment you're probably accustomed to :-)

Quote:
> Ideally,
> I'd like to be able to use the macro to paste an address into the Envelopes
> and Labels wizard.

Word dialog boxes have arguments, many of which you can preset before
displaying the dialog. Try concatenating the address information into a
single string, then pass it to the dialog box. For example:

    SendKeys "Cindy Meister" & vbCr & "Switzerland"
    With Dialogs(wdDialogToolsCrea{*filter*}velope)
        '.EnvAddress = "Cindy Meister"
        .EnvReturn = "test"
        .Show
    End With

Note that .EnvAddress did not work in my test, which is why I have a SendKeys
in there (which I normally would never do).

Cindy Meister
INTER-Solutions, Switzerland
http://www.*-*-*.com/
http://www.*-*-*.com/

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Thu, 30 Jan 2003 03:00:00 GMT  
 Form becomes active window but won't accept input with Wizard running behind it

Hi Cindy,

I understand what's going on now, and I think your suggestion is defnitely
the appropriate solution.  Thanks for your help.

Incidentally, I can get the list of arguments for
-wdDialogToolsCrea{*filter*}velope
-wdDialogToolsCreateLabels
-wdDialogToolsEnvelopesAndLabels
from Help, but I can't find what the arguments are supposed to be.  Are
these available online somewhere?  (Nowhere that I could find them!)  And
can you tell me what the differences are between the above three dialogs?
I'd like to know that I'm using the appropriate one.

tks,
Ian
============================================================================
======



Hi Ian,

Quote:
> However, if I assign a keystroke combination to the macro so that I can
run
> it after calling up the "Envelopes and Labels" tool, the form pops up and
> becomes the active window, but won't accept input (it just dings back at
me
> whenever I click anywhere).

Both Envelopes and Labels and Word VBA UserForms are "modal" - only they can
have the focus. I'd guess what you want to do is causing a conflict:
Envelopes and Labels doesn't have the focus, due to your form; but your form
can't work, either. Word and its dialogs and forms don't work like the
Access
environment you're probably accustomed to :-)

Quote:
> Ideally,
> I'd like to be able to use the macro to paste an address into the
Envelopes
> and Labels wizard.

Word dialog boxes have arguments, many of which you can preset before
displaying the dialog. Try concatenating the address information into a
single string, then pass it to the dialog box. For example:

    SendKeys "Cindy Meister" & vbCr & "Switzerland"
    With Dialogs(wdDialogToolsCrea{*filter*}velope)
        '.EnvAddress = "Cindy Meister"
        .EnvReturn = "test"
        .Show
    End With

Note that .EnvAddress did not work in my test, which is why I have a
SendKeys
in there (which I normally would never do).

Cindy Meister
INTER-Solutions, Switzerland
http://www.*-*-*.com/
http://www.*-*-*.com/

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Fri, 07 Feb 2003 03:00:00 GMT  
 Form becomes active window but won't accept input with Wizard running behind it

Quote:
>    SendKeys "Cindy Meister" & vbCr & "Switzerland"
>    With Dialogs(wdDialogToolsCrea{*filter*}velope)
>        '.EnvAddress = "Cindy Meister"
>        .EnvReturn = "test"
>        .Show
>    End With

>Note that .EnvAddress did not work in my test, which is why I have a
SendKeys
>in there (which I normally would never do).

Can anyone explain why .EnvAddress wouldn't work?


Fri, 07 Feb 2003 03:00:00 GMT  
 Form becomes active window but won't accept input with Wizard running behind it

Hi Ian,

Quote:
> I can't find what the arguments are supposed to be.  Are
> these available online somewhere?

Not really. If you have Word6 or 95 around, somewhere, you'll find that the
arguments for the commands of the same names more or less correspond - as
long as it's not a new feature.

Or, get a copy of the Word Developer's Kit, 3rd edition.

Quote:
> can you tell me what the differences are between the above three dialogs?

You could test 'em <g>? The first two show the specific dialog box; the
third the combined with both Envelopes and Labels tabs.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Sat, 08 Feb 2003 03:00:00 GMT  
 Form becomes active window but won't accept input with Wizard running behind it

Hi Ian,

Quote:
> Can anyone explain why .EnvAddress wouldn't work?

's a bug. (MS hasn't enabled the argument - we keep hoping,
version after version, that they finally get around to
fixing it!)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)



Sat, 08 Feb 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Form becomes active window but won't accept input with Wizard running behind it

2. Modal forms stuck behind main window - VB 3.0 on WIN 95

3. Active Form behind non-Active

4. Showing another form behind active form...

5. Migration Wizard won't upgrad a form! :-(

6. Windows 2000 - Acc97 modules won't run

7. Help - Can't Run Data Form Wizard

8. VB Progg won't run on Windows 95 version 1 - OLE32.DLL problem

9. Access memo field won't accept more than 255 chars

10. Please help: VB4 won't accept VBX

11. How to print forms which won't fit in a window

12. Form won't fit in window

 

 
Powered by phpBB® Forum Software