Pressing Enter in a User Form

N

NikkiB

Good Afternoon,

I am trying to incorporate the below code that I found in the discussion
groups into a user form. I would like the user to press enter to move from
field to field rather then tab.

http://support.microsoft.com/?kbid=187985

I've copied all 4 sections of code into VB Editor's Template Project, This
Document. But I receive the following error when I open and close the
template:

Microsoft Visual Basic Error Box:
The context cannot be modified.

I am using Word 2000 and only section 2 of my document is protected.

I am quite new to using VB coding and generally rely on recording macro's so
I apologize if I am not explaining myself correctly.

Any help would be greatly appreciated.

Thank you,

Nikki
 
J

Jean-Guy Marcil

NikkiB was telling us:
NikkiB nous racontait que :
Good Afternoon,

I am trying to incorporate the below code that I found in the
discussion groups into a user form. I would like the user to press
enter to move from field to field rather then tab.

http://support.microsoft.com/?kbid=187985

I've copied all 4 sections of code into VB Editor's Template Project,
This Document. But I receive the following error when I open and
close the template:

Microsoft Visual Basic Error Box:
The context cannot be modified.

I am using Word 2000 and only section 2 of my document is protected.

I am quite new to using VB coding and generally rely on recording
macro's so I apologize if I am not explaining myself correctly.

Any help would be greatly appreciated.

Thank you,

Nikki

What is the template name that contains the code?
Have you protected the template itself?

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
N

NikkiB

The template is named TermSheet.dot

I protect the template by going into:
Tools, Protect Document, Click Forms, Click Sections, Check box for Section
2 only, press ok and press ok again to protect.
 
J

Jean-Guy Marcil

NikkiB was telling us:
NikkiB nous racontait que :
The template is named TermSheet.dot

I protect the template by going into:
Tools, Protect Document, Click Forms, Click Sections, Check box for
Section 2 only, press ok and press ok again to protect.

The web page you quoted as the source for your code explicitly states in a
few places (3 of them I think) that the template must not be protected for
this code to work.

Try unprotecting the template first.


--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
N

NikkiB

Oh my goodness. I am so sorry for wasting your time.

Of course it works perfectly now.

Thank you for all your help.

Nikki
 
J

Jean-Guy Marcil

NikkiB was telling us:
NikkiB nous racontait que :
Oh my goodness. I am so sorry for wasting your time.

You did not waste my time... I am here to help... I just wanted to point out
that we all have to read everything... I am guilty of the same sin once in a
while... I skim something and assume that the procedure does not work when I
try...
Of course it works perfectly now.

Thank you for all your help.

Glad I could help.

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top