View Full Version : Solved: IF statements and Word textboxes.

03-02-2005, 06:30 AM
I have a userform with some textboxes on it. I would like one of the textboxes to add some characters to the front of the text input BUT only if something is added.

Therefore if the textbox is left blank and the user confirms the userform it will write nothing to the template.

However if the textbox has ?Newk? entered in it, the output will be ?cc. Newk?

Is this possible? I can only see it being possible with an IF statement in VBA.

Please could someone enlighten me!

Jacob Hilderbrand
03-02-2005, 08:04 AM
Try something like this:

If Me.TextBox1.Text <> "" Then
Selection.TypeText Text:="cc. " & Me.TextBox1.Text
End If

03-03-2005, 03:36 AM
Thank you DRJ that works a treat.

Jacob Hilderbrand
03-03-2005, 03:42 AM
You're Welcome :beerchug:

Take Care