genius thanxxxx Originally Posted by masoudk1990 Code: If Val(Text1.Text < 1000) Then Text1.Text = Format(Val(Text1.Text + 1), "0000") Else MsgBox "Overflow!", vbCritical, "Error!" End If
If Val(Text1.Text < 1000) Then Text1.Text = Format(Val(Text1.Text + 1), "0000") Else MsgBox "Overflow!", vbCritical, "Error!" End If
Originally Posted by vbnoob00 genius thanxxxx i keep getting that msgbox even on 0001
Originally Posted by vbnoob00 i keep getting that msgbox even on 0001 Sorry Code: If (Val(Text1.Text) < 9999) Then Text1.Text = Format(Val(Text1.Text + 1), "0000") Else MsgBox "Overflow!", vbCritical, "Error!" End If
If (Val(Text1.Text) < 9999) Then Text1.Text = Format(Val(Text1.Text + 1), "0000") Else MsgBox "Overflow!", vbCritical, "Error!" End If
Last edited by masoudk1990; Oct 28th, 2015 at 03:10 AM.
Computer Enterprise Masoud Keshavarz For more information contact [email protected]
View Tag Cloud
Forum Rules