View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
cereldine[_39_] cereldine[_39_] is offline
external usenet poster
 
Posts: 1
Default formatting input boxes


Thanks for your input dav135

I have used code in following way and it works exactly as i want


Do '' don't continue until correct search criteria is available
sYear = Application.InputBox("Which Year/Quarter should data b
returned until? (In the format of 2006Q4)?", "Select Date", "2005Q4")

If IsNumeric(Left(sYear, 4)) = False Or Len(sYear) < 6 Or Mid(sYear
5, 1) < "Q" Or IsNumeric(Right(sYear, 1)) = False Or Left(sYear, 4)
1990 Or Right(sYear, 1) 4 Then
MsgBox "Bad search value, try again!"
i = 0
Else
i = 1
End If
Loop Until i =

--
cereldin
-----------------------------------------------------------------------
cereldine's Profile: http://www.excelforum.com/member.php...fo&userid=3206
View this thread: http://www.excelforum.com/showthread.php?threadid=55260