Thread: Validation
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
unplugs[_4_] unplugs[_4_] is offline
external usenet poster
 
Posts: 1
Default Validation

How can i do the validation that if I want the data to be insert i
integer? If other then integer, an error msg will pop up.

My code is as follow:


If TextHours.Value = "" Then
MsgBox "You must enter a value in working hour."
Exit Sub


I had tried before the code following... but cannot work

If TextHours.Value = "" Or TextHours.Value < int Then
MsgBox "You must enter a value in working hour."
Exit Sub


Can u all point out what is the mistake that I had done

--
Message posted from http://www.ExcelForum.com