Moving to next field with F11 in protected document



I have a VBA macro that selects the word to the left of the cursor and
inserts a file of that name into the document. The macro counts the
fields in the document before and after the file is inserted, and if
the number increases (meaning there are fields in the file that was
inserted), it goes to the first field and ends. The user types what he
wants there and advances to the next field using F11. Now we want to
use this macro in a document where part of the document is protected,
and we find not only that the macro will not advance the cursor to the
first field but also that F11 will not move it to the next field, even
though it is in the unprotected part of the document.

I could turn off the protection at the start of the macro, but I don't
have a way to turn it back on, since the macro ends before the user
types into the various fields. Is there any way around this? As a last
resort, I would even settle for turning the protection back on after
some delay to allow the user time to enter the text in the various
fields.

Thanks in advance for any help.

David

.



Relevant Pages

  • Re: Cursor Direction
    ... The macro below assumes that you have set the default cursor movement as ... The macro does nothing if the entries are in B2 or B3, ... If the entry is in B4, the code will display a message box and ask something ... Note that this macro is a sheet macro and must be placed in the sheet module ...
    (microsoft.public.excel.misc)
  • Re: Return cursor to previous cell
    ... It could be any range, any range name, as long as when the macro is run, it ... creates the rangename relative to where the cursor is then, ... Go to the range "Anchor" (it matters not what the reference is because ... Stop recording ...
    (microsoft.public.excel.programming)
  • Re: Combo box
    ... the document and then move the cursor down a line and enable me to post ... I have tried running Record Macro to obtain the code to do this but ... Private Sub CmdClose_Click ... first two Dim statements. ...
    (microsoft.public.word.docmanagement)
  • Re: Combo box
    ... That's brilliant Jay. ... the document and then move the cursor down a line and enable me to post ... I have tried running Record Macro to obtain the code to do this but ... Private Sub UserForm_Initialize ...
    (microsoft.public.word.docmanagement)
  • Re: Combo box
    ... If the cursor is a collapsed point in the document, ... would have to have a separate field & macro for each selection. ... first two Dim statements. ... Private Sub UserForm_Initialize ...
    (microsoft.public.word.docmanagement)

Loading