S
Sean
Hi,
I have a question about my code posted below. For some reason, if
txtCurrentWeek.Value = 5 and txtTotalWeek.Value = 21, the msgbox will be
displayed, even though it shouldn't. I belive it has to do with the value
not being read as an integer or the length of the value (I assumed this
because if I set 'current' = 1 or = 2 and 'total' = 21, I get no error
message. Do I have to declare these .values as integers or to have a
specific length? If so how do I do that?
If txtCurrentWeek.Value > txtTotalWeek.Value Then
MsgBox "Current project week cannot exceed the total number of project
weeks.", vbOKOnly, "Error"
Exit Sub
End If
Thanks.
I have a question about my code posted below. For some reason, if
txtCurrentWeek.Value = 5 and txtTotalWeek.Value = 21, the msgbox will be
displayed, even though it shouldn't. I belive it has to do with the value
not being read as an integer or the length of the value (I assumed this
because if I set 'current' = 1 or = 2 and 'total' = 21, I get no error
message. Do I have to declare these .values as integers or to have a
specific length? If so how do I do that?
If txtCurrentWeek.Value > txtTotalWeek.Value Then
MsgBox "Current project week cannot exceed the total number of project
weeks.", vbOKOnly, "Error"
Exit Sub
End If
Thanks.