Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Jun 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trapping PageDown in a form (Word 2002)

    Hi,

    I have a Word2002 document that has one Section with a form
    That Section is Protected for Forms
    So you can jump from formfield to formfield using Tab and PageUp / PageDown.

    I want to trap the PageDown / PageUp buttons.

    Assigning a macro to the PageDown-button works fine in the UNprotected sections.
    But the macro does not fire in the form.

    Q: How can I trap the PageDown-button in the protected section?

    thanks,
    peter

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

    Re: Trapping PageDown in a form (Word 2002)

    As far as I know there is no way to do that - see for example this newsgroup post by Word MVP Bill Coan. (But if somebody proves me wrong, I'll be glad!)

  3. #3
    New Lounger
    Join Date
    Jun 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Trapping PageDown in a form (Word 2002)

    Hmmm...

    Tried to 'repair' it myself
    Tried to search Microsoft KB
    Did some searching on the Net
    Posted on this forum.... nothing helped <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>

    It looks like you are right: PageDown/PageUp behaves differently in a protected form.
    Ehm.. do the MS-Word developpers read this forum? <img src=/S/read.gif border=0 alt=read width=19 height=33>
    Thanks for your reply

    regards,
    peter

  4. #4
    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: Trapping PageDown in a form (Word 2002)

    Although I imagine it would be 10x as much work, and dicey if the user changes applications, you could in theory write code to disable PageUp and PageDown at the Windows level so that Word never receives the keystrokes, and then re-enable them when the user clicks into the unprotected portion of the document. Might generate a few help desk calls. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

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

    Re: Trapping PageDown in a form (Word 2002)

    <img src=/S/yikes.gif border=0 alt=yikes width=15 height=15> Interesting idea, but I would think twice before implementing it. As you indicate yourself, there is too much that can go wrong.

  6. #6
    New Lounger
    Join Date
    Jun 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Trapping PageDown in a form (Word 2002)

    Hi,

    I believe you guys, if you say it isn't easy.
    So i don't want to venture that route

    Point is: i have some 20 pairs of checkboxes in my protected form.
    If user uses mouse, no problem: my macros have a behaviour they want.

    If user uses PgDn/PgUp:
    1)it is hard to see where they are, and
    2)my macro toggles the checkbox(es)
    Esp. if they are lost, they try to PgDn out of the protected form, and end up with results they don't want.

    Any ideas how i can work around that behaviour?

    regards,
    peter

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

    Re: Trapping PageDown in a form (Word 2002)

    The best way is probably not to let the user change the check boxes directly (clear "Check box enabled"). Instead, provide a userform (created in the Visual Basic Editor), and tick/clear the check boxes in the document from the code for the OK button on the userform.
    This is more work, but userforms give you much more control over what the user can and can't do.

  8. #8
    New Lounger
    Join Date
    Jun 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Trapping PageDown in a form (Word 2002)

    Hi,

    Yes... that is the answer i feared: i've read such an advice before.
    I'll consider it.

    Thanks you all

    regards,
    peter

Posting Permissions

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