Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Non-modal dialogs (Word97 (NT))

    Hi

    I'm developing a set of Word for Visual Basic macros (Word 97) that display a large and complex dialog.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Non-modal dialogs (Word97 (NT))

    I don't think running it from Excel will help. To execute VBA for Word code from another application, you'll have to use a Word.Application object. This either refers to the running instance of Word and will get into trouble if a userform is loaded, or to a new instance of Word - resource problems again.

    Why does the userform have to be open all day? It's probably better to give the user the possibility to close it. You can save all settings in public variables (or in document properties or document variables) when the userform is closed and reload them when the user reopens the userform.

  3. #3
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Non-modal dialogs (Word97 (NT))

    Is standalone VB an option?
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Non-modal dialogs (Word97 (NT))

    Thanks Geoff and Hans

    It will be used for their core activity, so each time they have to close the form causes delays.

    Standalone VB?

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Non-modal dialogs (Word97 (NT))

    By "standalone VB" Geoff means (if I may take the liberty to answer for him) the Visual Basic 6 compiler. You can create standalone executables with it (opposed to VBA in Word, Excel etc.)
    VB6 has non-modal forms and can interface with Word by Automation (i.e. using a Word.Application object).
    You'd need to buy VB6. If you are familiar with programming userforms in Word, it shouldn't be too hard to start working with VB6.

  6. #6
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Non-modal dialogs (Word97 (NT))

    Thanks Hans. I could not have said it better.

    If Dale does not have VB available though (as it seems), it won't help.

    It certainly would avoid the big startup overhead of Word or Excel. But it could lead to another learning curve about distribution of VB exes (though perhaps only a problem if other DLLs are used, and distributed to an external organisation).
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Non-modal dialogs (Word97 (NT))

    Thanks, Hans and Geoff

    That's interesting, and it might well be an option I can consider.

  8. #8
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Non-modal dialogs (Word97 (NT))

    Dale,

    You would end up with a separate executable. But you could not distrubute it alone- you would need to also distribute various support DLLs. VB (Professional edition?) has a "Package and Deployment Wizard" to assist in this process.

    Yes, users could initiate this process from on icon- or it could be automated into a startup routine.

    VB6 can use remote automation to manipulate documents. If Word is not open, it can start an invisible instance of Word, manipulate, and close the document and Word. Some quite powerful stuff.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  9. #9
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Non-modal dialogs (Word97 (NT))

    I've got something to think about. Thanks to you both for your help

    Dale

  10. #10
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Non-modal dialogs (Word97 (NT))

    Would it be possible to implement the dialog's features as a Toolbar? You don't have much vertical space to work with, of course, but otherwise you have lots of options.

  11. #11
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Non-modal dialogs (Word97 (NT))

    VB6 could use Word only via Automation.

  12. #12
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Non-modal dialogs (Word97 (NT))

    I don't think it would work, as there are dozens of pieces of information to be collected, and the order of collection is also important.

    Thanks for the suggestion
    Dale

  13. #13
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Non-modal dialogs (Word97 (NT))

    I don't understand that, Howard. What are the implications?
    Dale

  14. #14
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Non-modal dialogs (Word97 (NT))

    Any Userforms developed in VBA could be referenced and used via Automation in VB, but the VBA Userforms would still be limited to modal.

    You would need to develop all the Userforms in VB and use Word via automation to work with documents.

  15. #15
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Non-modal dialogs (Word97 (NT))

    It seems that the easiest solution is to upgrade to Word 2000 or Word 2002, if the users of yiur product have those.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •