Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation
and 1 more question.... what is the VBA code that do the validation tha
cannot have duplicate entries ? For example, cannot have 2 different id for the entries -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation
Hi,
Try, Sub nonnum() Application.ScreenUpdating = False Worksheets("sheet1").Activate If Not (IsNumeric(Range("b1").Value)) Then MsgBox "Last Backup was on: " & Range("b1").Value End If End Sub Hope this gets you started Charle -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation
Thanks for the reply, Charles... Anyway... It cannot help solve m
problem. My codes are as follow: If TextName.Text = "" Then MsgBox "You must enter a name." Exit Sub End If If TextHours.Value = "" Then MsgBox "You must enter a value in working hour." Exit Sub Else If TextHours.Value 8 Then OT = TextHours.Value - 8 MsgBox "Your OT is," & OT End If End If I want to do the validation so that the TextHours.Value can just accep the integer numbers only. If user key in alphabet or any sign inside it will pop up an error msg. Hope u can help me to solve this problem... THank -- Message posted from http://www.ExcelForum.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation
unplug,
Check the attachment. This is what I came up with. Range A1 is named "texthour" Range B1 is named "textname" HTH Charle Attachment filename: unplug.xls Download attachment: http://www.excelforum.com/attachment.php?postid=57184 -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Validation Data using Validation Table cell range..... | Excel Discussion (Misc queries) | |||
data validation invalid in dynamic validation list | Excel Worksheet Functions | |||
Validation (Drop down list vs simple text length validation) | Excel Programming | |||
Validation (Drop down list vs simple text length validation) | Excel Programming | |||
Validation (Drop down list vs simple text length validation) | Excel Programming |