How do I prevent users from using the "Enter" button on my form?

S

serpico555

I made a form for work, however when someone uses the "Enter" button, it
ruins the formatting of the form. Could someone illistrate to me how I can
disable the Enter button in my form when I protect it.
 
M

MervB

Do a google search for:
"WD97: How to Code the ENTER Key to Move to Next Field in Protected Form"

But be afraid - be very afraid

It works well but, if you move to another word document without closing the
macro you will find that the [Enter] key is deactivated.

MervB
:)
 
S

serpico555

Right on....Thanks MervB.....

MervB said:
Do a google search for:
"WD97: How to Code the ENTER Key to Move to Next Field in Protected Form"

But be afraid - be very afraid

It works well but, if you move to another word document without closing the
macro you will find that the [Enter] key is deactivated.

MervB
:)

serpico555 said:
I made a form for work, however when someone uses the "Enter" button, it
ruins the formatting of the form. Could someone illistrate to me how I can
disable the Enter button in my form when I protect it.
 
J

Jean-Guy Marcil

MervB was telling us:
MervB nous racontait que :
Do a google search for:
"WD97: How to Code the ENTER Key to Move to Next Field in Protected
Form"

But be afraid - be very afraid

It works well but, if you move to another word document without
closing the macro you will find that the [Enter] key is deactivated.

No need to be afraid ;-)

See
http://word.mvps.org/faqs/macrosvba/AppClassEvents.htm
for info on document events.
Just code a Document_Change event to activate/deactivate the Enter key as
needed.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
Top