Unable to cast object of type 'System.String' to type 'System.Windows.Forms.TextBox'.
ayagi 0 Junior Poster
Recommended Answers
Jump to Post— bLuEmEzzy 0you can not convert string to textbox.
Jump to Post— codeorder 197TextBox1 = ""The above line will cause this error:
Value of type 'String' cannot be converted to 'System.Windows.Forms.TextBox'.Can easily be fixed by setting the .Text of the TextBox as the String, and not the TextBox it's self.TextBox1.Text = ""Without …
Jump to Post— codeorder 197>>it says "Index was outside the bounds of the arrays"
This usually occurs when your (i) goes over the Array length/count.
.Here's an example.Try Dim arTemp() As String = {"one", "two", "three"} MsgBox(arTemp(3)) Catch ex As Exception MsgBox(ex.Message) End TrySince Arrays start at 0 …
All 12 Replies
bLuEmEzzy 0 Junior Poster in Training
codeorder 197 Nearly a Posting Virtuoso
ayagi 0 Junior Poster
codeorder 197 Nearly a Posting Virtuoso
ayagi 0 Junior Poster
codeorder 197 Nearly a Posting Virtuoso
ayagi 0 Junior Poster
codeorder 197 Nearly a Posting Virtuoso
ayagi 0 Junior Poster
ayagi 0 Junior Poster
codeorder 197 Nearly a Posting Virtuoso
ayagi 0 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.