
Prevent user from closing form using caption close button
Is the "caption close" button, the"x" in the title bar?
If so, the Userform_queryclose works in VBA just as it does in VB.
--
Please post your response to the newsgroup.
http://www.standards.com/ipusers/standards; Word macros, including
converting from WordBasic to VBA; Technical writing and reviewing; Standards
------------------------------------------------
Dear all,
I try to find a solution to prevent the user to close a userform in Word97
with
the close button of the caption bar.
VB provides the ability to leave the close event without leaving the form by
setting the cancel parameter to true. But I'm missing a simmilar
functionality
within Word VBA
I Tried to disable the button via the API functions FindWindow("OPUSAPP",
vbnullstring), GetWindow(hwnd, GW_CHILD), GetWindow(hwnd, GW_HWNDNEXT) and
SetMenuItemInfo. The only result is that I can disable the close button of
the
main window (the word instance) instead of the modal user form.
Also a property like me.hwnd as in Access VBA is missing.
Has someone a workable solution for such a problem.
rgds,
Alexander