View Single Post
 
Old 05-30-2018, 04:17 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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