chukesgirl
Technical User
Hello Everyone!
I am new to Word VBA and I need help with some code. I am using Word 2007 on WinXP, if that helps. I have a template with a userform. For one of the textboxes, I want to insert some text before the value of the textbox is entered. Right now the way I have it set up, if the user types a number in the textbox, it will appear as the sample below. I tried putting the text directly into the textbox, but it displays even when there is no number entered which I don't want because there isn't always going to be a number so that field should be blank.
Sample:
John Doe
111111
My textboxes are coded like this:
.Bookmarks ("name").Range.Text=txtname
.Bookmarks ("clientno").Range.Text=txtclientno
I want to have the words Client number appear before the 111111.
John Doe
Client number 1111111
Is there a simple way to do this?
I am new to Word VBA and I need help with some code. I am using Word 2007 on WinXP, if that helps. I have a template with a userform. For one of the textboxes, I want to insert some text before the value of the textbox is entered. Right now the way I have it set up, if the user types a number in the textbox, it will appear as the sample below. I tried putting the text directly into the textbox, but it displays even when there is no number entered which I don't want because there isn't always going to be a number so that field should be blank.
Sample:
John Doe
111111
My textboxes are coded like this:
.Bookmarks ("name").Range.Text=txtname
.Bookmarks ("clientno").Range.Text=txtclientno
I want to have the words Client number appear before the 111111.
John Doe
Client number 1111111
Is there a simple way to do this?