The Private Sub FillBM is simply a means of writing a value into a named bookmark without destroying the bookmark. It is called from the first macro to set the values in three bookmarks according to the setting of the check box in the userform.
Basically it sets a range to the bookmarked range, writes a new value to the range, then resets the bookmark to the modified range.
As the Function is marked 'Private' it must be in the same module as the macro that calls it.
If you manually delete text, there is every possibility that you will also delete the bookmark.
If you want to change the value in a bookmark, call the function with a new value
FillBM BookmarkName, Value
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
|