2 Replies - 3341 Views - Last Post: 25 February 2012 - 05:02 PM Rate Topic: -----

#1 chelle2012  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 23-February 12

Error Message Text not member of String

Posted 25 February 2012 - 04:42 PM

I keep getting an error message in my code "text is not a member of string" on each line similiar to: TextBoxVerb1 = TextBoxVerb1.text.Trim and I can't figure it out. Any suggestions? Here is the code:

Private Sub Buttonsubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buttonsubmit.Click
        Dim str As String
        Dim TextBoxVerb1 As String
        Dim TextBoxVerb2 As String
        Dim TextBoxVerb3 As String
        Dim TextBoxVerb4 As String
        Dim TextBoxVerb5 As String
        str = "ing"
        TextBoxVerb1 = TextBoxVerb1.text.Trim
        TextBoxVerb1 = String.Concat(TextBoxVerb1, str)
        TextBoxVerb2 = TextBoxVerb2.text.Trim
        TextBoxVerb2 = String.Concat(TextBoxVerb2, str)
        TextBoxVerb3 = TextBoxVerb3.text.Trim
        TextBoxVerb3 = String.Concat(TextBoxVerb3, str)
        TextBoxVerb4 = TextBoxVerb4.text.Trim
        TextBoxVerb4 = String.Concat(TextBoxVerb4, str)
        TextBoxVerb5 = TextBoxVerb5.text.Trim
        TextBoxVerb5 = String.Concat(TextBoxVerb5, str)
    End Sub

This post has been edited by AdamSpeight2008: 25 February 2012 - 07:04 PM
Reason for edit:: Please use the CODE Tags for code


Is This A Good Question/Topic? 0
  • +

Replies To: Error Message Text not member of String

#2 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1030
  • View blog
  • Posts: 4,012
  • Joined: 02-July 08

Re: Error Message Text not member of String

Posted 25 February 2012 - 04:48 PM

I think your confusing the textboxes with string variables, if you rename the string variables so they do not match the names of your textboxes thing may go better. You are also tell the variable to = one thing and changing it on the next line - is that what you really want?
Was This Post Helpful? 0
  • +
  • -

#3 chelle2012  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 23-February 12

Re: Error Message Text not member of String

Posted 25 February 2012 - 05:02 PM

Thanks, I will change the variables. And you're right, I don't want that, I'm only trying to get the type a word in the textbox and when I click the submit button, "ing" will be added to the word in the listbox.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1