Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21107

Type Mismatch error 13.

$
0
0
I am writing a simple program that reads the text from 6 text boxes and saves them to a file. The declarations are all the same (integer). They all work fine except the last one. Here is my code

Option Explicit
Dim one, two, three, four, five, sixx As Integer
Dim FileNum As Integer
Dim FileString As String
Dim Date1 As String

Private Sub btnAdd_Click()

one = txtNumOne.Text
two = txtNumTwo.Text
three = txtNumThree.Text
four = txtNumFour.Text
five = txtNumFive.Text
sixx = txtNumSix.Text


If one < 1 Or one > 54 Then
box
txtNumOne.SetFocus
End If
If two < 1 Or two > 54 Then
box
txtNumOne.SetFocus
End If
If three < 1 Or three > 54 Then
box
txtNumOne.SetFocus
End If
If four < 1 Or four > 54 Then
box
txtNumOne.SetFocus
End If
If five < 1 Or five > 54 Then
box
txtNumOne.SetFocus
End If
If sixx < 1 Or sixx > 54 Then 'Error occurs in this line
box
txtNumOne.SetFocus
End If

If anyone can help me resolve this issue, it would be greatly appreciated

Signed:
Pulling my Hair out

Viewing all articles
Browse latest Browse all 21107

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>