Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check Input, into Input box question
Hello all, i have an input box(code below) and i have 3 entries, is
there a way that i can check that each entry made in the input box is in actual fact in the date format 26/07/07 ?? Private Sub Workbook_Open() ' Dim strDates As String, s As Variant strDates = Application.InputBox("Enter the ""from"" ""to"" dates and the" & vbCrLf & _ "date paid, each date seperated by a "",""..", "SALARY PERIOD") If strDates = False Then End Else s = Split(strDates, ",") Range("B11").Value = s(0) Range("D11").Value = s(1) Range("B21").Value = s(2) PrintSlip End If End Sub Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check Input, into Input box question
A partial solution is to declare a date variable and test the input
values with it, e.g. Dim dt1 as Date dt1 = s(0) If the input value isn't a date, a type mismatch will result. Hth, Merjet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check Input, into Input box question
Thanks merjet, will try... :0)
Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Input box data check | Excel Discussion (Misc queries) | |||
Check for repeated input | Excel Programming | |||
check input in cells | Excel Programming | |||
input check in cell question | Excel Programming | |||
Check on the input in an inputbox | Excel Programming |