Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hello, I have a box used exclusivley for date entry. If someone does not enter it in this format "DD/MM/YYYY" then a msgbox appears saying "Date must be entered in this format...". When this incorrect entry occurs I would like to force the user to stay in the date box until he has entered correctly. I have tried date1.setfocus, date1.tabstop and everything else I can think of but nothing is working. This is my code at the minute Public Sub Date1_AfterUpdate() If Date1.Value = Format(Date1.Value, "DD/MM/YYYY") Then Else MsgBox "Date must be entered in this format: DD/MM/YYYY" End If End Sub Please help!!! Thank You -- johncassell ------------------------------------------------------------------------ johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016 View this thread: http://www.excelforum.com/showthread...hreadid=391628 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to prevent data from moving to a different cell | Excel Worksheet Functions | |||
how do i prevent a row from moving, like subheader that is visibl | New Users to Excel | |||
Can I prevent a sheet from moving within a workbook? | Excel Programming | |||
Can I prevent a sheet from moving within a workbook? | Excel Programming | |||
Prevent control & break | Excel Programming |