Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where is it getting "False" from??

Status
Not open for further replies.

slwolf8

Technical User
Apr 23, 2001
82
US
Here is the code I'm working with:

Dim strAmendType As String
strAmendType = cboAmendReply.Text

ActiveDocument.Bookmarks("bmkAmendType").Select
Selection.TypeText Text = strAmendType
ActiveDocument.Bookmarks("bmkAmendType2").Select
Selection.TypeText Text = strAmendType

The cboAmendReply is initialized with two items, "An Amendment" and "A Reply". The style of the combo box does not allow additional items to be entered. When I tested this code out by choosing "An Amendment" from the combo box it put "False" in both of the bookmark spots. Why is it putting "false" instead of "An Amendment"? This is not within a conditional statement. This code executes from a button_click event.
 
i believe that for the
selectionltypetext text=strAmendType
that you have... you have to have it like this

selection.typetext (strAmendType)

not text=

Let me know if that worked

Paul J.

 
That did work thank you!! It's weird though because I use that other syntax all the time without a problem. Oh well I'm just happy it works now! Thanks again!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top