How to cure Text repetition after using InsertBefore?

J

Jeffery B Paarsa

On a multi page userform I am using repetition of following code for
populating the document from the data entered by the user on the userform.
.Bookmarks("MYrsProsTest").Range _
.InsertBefore MYrsProsTest
.Bookmarks("MYrsProsTest").Range.Font.Color = wdColorRed
ActiveDocument.Fields.Update
UserForm1.MultiPage1.Value = MultiPage1.Value + 1

As long as the user stays in sequence of page after page everything works
perfect but if user clicks on page tab and come back to the previous page
that he/she has had entry on, the data gets duplicated. i.e. if he/she has
entered "5 years" in the MYrsProsTest at initial entry again when he/she
comes back to this page for a correction or Modification and wants to move on
to the next page the data inserted in MYrsProsTest will be duplicated and
filled with "5 years 5 years". Does anybody can suggest a way to stop this
behavior? I did not see any method for clearing the field in the object
browser.
 

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