Hi there, I'm new to VBA and hoping someone could help, if this might even be possible.
A date will be manually added by the user into TEXTBOX1.
.Bookmarks("BOOKMARK1").Range _
.InsertBefore TEXTBOX1
I have option buttons for the user to select which will place specific text and formatting (depending on the button selected) into the document as follows:
I am trying to get the date that has been entered in TEXTBOX1 to appear at the end of the sentence of EXAMPLE SENTENCE 2. Can anybody please help with this? Thank you!Private Sub OptionButton2_Click() If Me.OptionButton2.Value = True Then Set oRng = ActiveDocument.Bookmarks("BOOKMARK2").Range oRng.Text = "EXAMPLE SENTENCE 1" & Chr(11) & Chr(9) & _ "EXAMPLE SENTENCE 2" & Chr(11) & _ "EXAMPLE SENTENCE 3" & vbNewLine & " " ActiveDocument.Bookmarks.Add "BOOKMARK2", oRng End If End Sub




Reply With Quote
