Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Pressing Enter in a User Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NikkiB - 26 Sep 2007 19:50 GMT
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
Jean-Guy Marcil - 26 Sep 2007 23:00 GMT
NikkiB was telling us:
NikkiB nous racontait que :

> Good Afternoon,
>
[quoted text clipped - 21 lines]
>
> Nikki

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

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

NikkiB - 26 Sep 2007 23:34 GMT
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.

> NikkiB was telling us:
> NikkiB nous racontait que :
[quoted text clipped - 26 lines]
> What is the template name that contains the code?
> Have you protected the template itself?
Jean-Guy Marcil - 26 Sep 2007 23:59 GMT
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.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

NikkiB - 27 Sep 2007 15:11 GMT
Oh my goodness. I am so sorry for wasting your time.

Of course it works perfectly now.

Thank you for all your help.

Nikki

> NikkiB was telling us:
> NikkiB nous racontait que :
[quoted text clipped - 10 lines]
>
> Try unprotecting the template first.
Jean-Guy Marcil - 28 Sep 2007 00:14 GMT
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.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.