View Single Post
 
Old 01-13-2015, 04:20 AM
PeterPlys PeterPlys is offline Windows 8 Office 2013
Novice
 
Join Date: Jan 2015
Location: Denmark
Posts: 7
PeterPlys is on a distinguished road
Default Form updating Bookmarks - writes to the bookmarks multiple times

I have a template with one form having 3 fields that runs 1 time when a new doc is created.
I assign the input to 3 variables and
assign the variables to bookmarks in the footer of the document.

That works fine.

Then I start to write the text in the document and sometimes the input stops to appear on the screen and the bookmarks in the footer have their content added one time every time I press enter. I have this on several PCs now.

My code for the form is:

Code:
Private Sub CommandButton1_Click()
Set Snr = ActiveDocument.Bookmarks("Snr").Range
Snr.Text = Me.TextBox1.Value
Dim Bes As Range
Set Bes = ActiveDocument.Bookmarks("Bes").Range
Bes.Text = Me.TextBox2.Value
Dim Ini As Range
Set Ini = ActiveDocument.Bookmarks("Ini").Range
Ini.Text = Me.TextBox3.Value
UserForm1.Hide
End Sub
My 3 bookmarks are named: Snr, Bes and Ini


Any ideas?
Reply With Quote