locked
System.InvalidOperationException was unhandled Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Conversion from string "" to type 'Integer' is not valid." Source="BandZ V1.1" StackTrace: a RRS feed

  • Question

  • <img alt="Th project was working fine but i messed something arround in in the project page after dat this error is comming up. Will be glad if someone helps" src="https://social.msdn.microsoft.com/Forums/getfile/1117037" />
    Tuesday, August 29, 2017 2:52 PM

All replies

  • <img alt="Th project was working fine but i messed something arround in in the project page after dat this error is comming up. Will be glad if someone helps" src="https://social.msdn.microsoft.com/Forums/getfile/1117037" />

    Put a breakpoint in and you'll see why: No doubt that line is an empty string (as the message shows).

    There are other things that I'd suggest changes to but they're not part of this error.


    "A problem well stated is a problem half solved.” - Charles F. Kettering

    Tuesday, August 29, 2017 3:28 PM
  • A thought, you attempted to convert a string that could not be represented as an integer (or double or decimal) via say CInt function. If so try using TryParse as shown below). Also, as Frank indicated, set a breakpoint to assist.

    Dim value As String = ""
    Dim data As Integer = 1
    If Integer.TryParse(value, Data) Then
        MessageBox.Show(data.ToString)
    Else
        MessageBox.Show("Invalid")
    End If


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Proposed as answer by Frank L. Smith Tuesday, August 29, 2017 4:30 PM
    Tuesday, August 29, 2017 4:28 PM