My code is:
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged Dim totalXP As Double totalXP = TextBox2.Text If (totalXP >= 0) And (totalXP <= 999) Then TextBox1.Text = 1 ElseIf (totalXP >= 1000) And (totalXP <= 2249) Then TextBox1.Text = 2 ElseIf (totalXP >= 2250) And (totalXP <= 3749) Then TextBox1.Text = 3 ElseIf (totalXP >= 3750) And (totalXP <= 5499) Then TextBox1.Text = 4 ElseIf (totalXP >= 5500) And (totalXP <= 7499) Then TextBox1.Text = 5 ElseIf (totalXP >= 7500) And (totalXP <= 9999) Then TextBox1.Text = 6 ElseIf (totalXP >= 10000) And (totalXP <= 12999) Then TextBox1.Text = 7 ElseIf (totalXP >= 13000) And (totalXP <= 16499) Then TextBox1.Text = 8 ElseIf (totalXP >= 16500) And (totalXP <= 20499) Then TextBox1.Text = 9 ElseIf (totalXP >= 20500) And (totalXP <= 25999) Then TextBox1.Text = 10 ElseIf (totalXP >= 26000) And (totalXP <= 31999) Then TextBox1.Text = 11 ElseIf (totalXP >= 32000) And (totalXP <= 38999) Then TextBox1.Text = 12 ElseIf (totalXP >= 39000) And (totalXP <= 46999) Then TextBox1.Text = 13 ElseIf (totalXP >= 47000) And (totalXP <= 56999) Then TextBox1.Text = 14 ElseIf (totalXP >= 57000) And (totalXP <= 68999) Then TextBox1.Text = 15 ElseIf (totalXP >= 69000) And (totalXP <= 82999) Then TextBox1.Text = 16 ElseIf (totalXP >= 83000) And (totalXP <= 98999) Then TextBox1.Text = 17 ElseIf (totalXP >= 99000) And (totalXP <= 118999) Then TextBox1.Text = 18 ElseIf (totalXP >= 119000) And (totalXP <= 142999) Then TextBox1.Text = 19 ElseIf (totalXP >= 143000) And (totalXP <= 174999) Then TextBox1.Text = 20 ElseIf (totalXP >= 175000) And (totalXP <= 209999) Then TextBox1.Text = 21 ElseIf (totalXP >= 210000) And (totalXP <= 254999) Then TextBox1.Text = 22 ElseIf (totalXP >= 255000) And (totalXP <= 309999) Then TextBox1.Text = 23 ElseIf (totalXP >= 310000) And (totalXP <= 374999) Then TextBox1.Text = 24 ElseIf (totalXP >= 375000) And (totalXP <= 449999) Then TextBox1.Text = 25 ElseIf (totalXP >= 450000) And (totalXP <= 549999) Then TextBox1.Text = 26 ElseIf (totalXP >= 550000) And (totalXP <= 674999) Then TextBox1.Text = 27 ElseIf (totalXP >= 675000) And (totalXP <= 824999) Then TextBox1.Text = 28 ElseIf (totalXP >= 825000) And (totalXP <= 999999) Then TextBox1.Text = 29 ElseIf (totalXP = 1000000) Then TextBox1.Text = 30 Else TextBox1.Hide() Label8.Text = "No such level." End If End Sub
This is currently on Dungeons and Dragons 4th edition because they're 30 levels and not the usual 20.
My error is: Conversion from string "" to type 'Double' is not valid.
With:
Dim totalXP As Integer
Error: Conversion from string "" to type 'Integer' is not valid.
Because I am running Windows 7 Ultimate RC 64-bit, would I have to put Int64?

New Topic/Question
Reply



MultiQuote







|