View Single Post
 
Old 12-10-2015, 10:03 PM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote