I have a rocket that won't fly to the moon. Why?
Would you be willing to show us your code? ;-)
Hi Greg,
Hope this clarifys it. The code is:
Sub Add4StatusBar()
Application.StatusBar = "Type the letter."
' GoToBookmark named StartLetter
Selection.GoTo What:=wdGoToBookmark, Name:="StartLetter"
End Sub
Thanks in advance
Denise
> I have a rocket that won't fly to the moon. Why?
>
> Would you be willing to show us your code? ;-)
Charles Kenyon - 04 May 2006 13:10 GMT
I just tried your code in a protected document and it runs fine when run
from the vba editor but when run as an on-exit macro it runs and then the
tab completes and goes to the next formfield. When in the last formfield it
also runs but the tab completes at the beginning of the unprotected section.
You need to either end your unprotected section where you want typing to
begin or put in a wait or timeout into your macro.

Signature
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
> Hi Greg,
>
[quoted text clipped - 16 lines]
>>
>> Would you be willing to show us your code? ;-)
Greg Maxey - 04 May 2006 13:50 GMT
Dee,
Charles explains what is happening. You can work around it with a
variation of:
Sub Add4StatusBar()
Application.OnTime When:=Now, Name:="ReallyAdd4StatusBar"
End Sub
Sub ReallyAdd4StatusBar()
Application.StatusBar = "Type the letter."
If ActiveDocument.Bookmarks.Exists("StartLetter") Then
ActiveDocument.Bookmarks("StartLetter").Select
End If
End Sub
DeDe - 05 May 2006 03:00 GMT
Hi Greg,
Thank you for your response. I copied your code into the VBA window saved
and re-tested. However, I still had no luck.
Denise
> Dee,
>
[quoted text clipped - 10 lines]
> End If
> End Sub
Greg Maxey - 05 May 2006 03:35 GMT
Hmm...it worked for me at work today. The Application.OnTime introduces a
short delay that should get you past the "Tab" effects. Try andding a bit
of delay like this:
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub Add4StatusBar()
Application.ScreenUpdating = False
Doze 100
End Sub
Sub Add4StatusBarReally()
If ActiveDocument.Bookmarks.Exists("Details") Then
ActiveDocument.Bookmarks("Details").Select
End If
End Sub
Sub Doze(ByVal lngPeriod As Long)
DoEvents
Sleep lngPeriod
Add4StatusBarReally
End Sub
I didn't test this becasue I didn't take the time to recreate your document.
If it doesn't work I am at a loss.

Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
> Hi Greg,
>
[quoted text clipped - 17 lines]
>> End If
>> End Sub
DeDe - 05 May 2006 07:30 GMT
Hi Greg,
Still no luck - will have to let it go. My thanks to you and Charles for
your attention to this issue.
Kind regards
Denise
> Hmm...it worked for me at work today. The Application.OnTime introduces a
> short delay that should get you past the "Tab" effects. Try andding a bit
[quoted text clipped - 41 lines]
> >> End If
> >> End Sub
Greg Maxey - 05 May 2006 13:08 GMT
You can e-mail me your document if you want to and I will have a look.