2 Replies - 3389 Views - Last Post: 05 January 2012 - 09:40 AM Rate Topic: -----

#1 mssrivathsan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 10-October 11

Error 1 Value of type 'String' cannot be converted to...

Posted 05 January 2012 - 09:34 AM

I am trying to create a program with vb.net. I am getting the following error in the form1.designer.vb and so I am not able to run the program. Its urgent. Please help me out.


Error 1 Value of type 'String' cannot be converted to 'System.Windows.Forms.TextBox'. C:\Documents and Settings\Srivathsan\Local Settings\Application Data\Temporary Projects\Cyber Cloud\Form1.Designer.vb 491 19 Cyber Cloud

And it says that the error is with this line

Me.name = "Form1"


Is This A Good Question/Topic? 0
  • +

Replies To: Error 1 Value of type 'String' cannot be converted to...

#2 janne_panne  Icon User is offline

  • WinRT Dev
  • member icon

Reputation: 428
  • View blog
  • Posts: 1,047
  • Joined: 09-June 09

Re: Error 1 Value of type 'String' cannot be converted to...

Posted 05 January 2012 - 09:39 AM

In your code the name of your textbox is probably "name"? You can't assign object of type String to TextBox. What you need to do is to assign the String to TextBox's .Text property:

Me.name.Text = "Form1"


Was This Post Helpful? 0
  • +
  • -

#3 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8371
  • View blog
  • Posts: 31,098
  • Joined: 12-June 08

Re: Error 1 Value of type 'String' cannot be converted to...

Posted 05 January 2012 - 09:40 AM

My guess is you have a textbox called "name"... which is also what a function is called... I would suggest changing the textbox's name.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1