[VB.NET] Conversion from string ":0" to type 'Integer' is not valid.
I'm making a clock application where the user can set the time, and this is the code I'm using to set the minute to a lower minute: `Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.click` `Dim newmin As Integer` `Dim currmin As Integer` `currmin = RichTextBox1.Text.Substring(RichTextBox1.Text.IndexOf(":"), 2)` <line with the error `newmin = currmin - 1` `End Sub` The text in the richtextbox is `00:00`, but I'm not sure why the error is occurring. Any thoughts? @Opcode halp while I eat dinner? ;)
also, @bibby I don't remember if u even pro0grimm or nawt but halp pl0x
Btw, it should be pulling the text from after the `:` and not the `:` itself.
Idk how the strings work in vb. try putting quote marks around the 2
That's not a string. It's specifying the length (of chars) to read.
oh I have no idea lol
well dangflabbit, bibby >.>
Well if it's anything like C#, you should have 2, in round brackets.
Not necessary.
@nincompoop
Might be an boundary error. Try changing `RichTextBox1.Text.IndexOf(":")` into `RichTextBox1.Text.IndexOf(":") + 1`
Join our real-time social learning platform and learn together with your friends!