Given that you have two CommandButton1_Click subs, it's hardly surprising it doesn't work. You need to sort out which CommandButton each relates to.
As for your first CommandButton1_Click sub, you don't need any of your Dim statements and lines like:
Set bmdate = ActiveDocument.Bookmarks("bmdate").Range
bmdate.Text = Me.TextBox1.Value
These could all be reduced to lines like:
Call UpdateBookmark("bmdate", TextBox1.Value)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|