Dim line As String = System.IO.File.ReadAllText("SerialNumber.ini.txt") TextBox1.Text = line Label1.Text = line SearchWithinThis = line MsgBox(SearchWithinThis) FirstCharacter = SearchWithinThis.IndexOf(SearchForThis) MsgBox(FirstCharacter) LineModded = line.Substring(FirstCharacter + 1, 10) LineModded += 1 MsgBox(LineModded)
Dim s1 As String = "000000000000" Dim l As Long = Val(s1) Debug.Print(l.ToString()) Dim s2 As String = (l + 1).ToString().PadLeft(11, "0") Debug.Print(s2)
0 00000000001
LineModded = (CInt(line) + 1).ToString("0000000000")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)