Thread: Userform
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robin Clay[_3_] Robin Clay[_3_] is offline
external usenet poster
 
Posts: 55
Default Userform

Greetings !

Tom suggests I need a userform.

My code at the moment includes :

---------------------------
Do
CutOffDate = InputBox("Enter the cut-off date " & _
"and time you want," & vbCrLf & _
"i.e. copy only files more recent" & _
vbCrLf & _
"in the format dd/mm/yyyy hh:mm:ss", _
"Get Cut-off Date & Time", _
"04/08/2004 07:30:00")
If Len(CutOffDate) < 19 _
Or Mid(CutOffDate, 3, 1) < "/" _
Or Mid(CutOffDate, 6, 1) < "/" _
Or Mid(CutOffDate, 11, 1) < " " _
Or Mid(CutOffDate, 14, 1) < ":" _
Or Mid(CutOffDate, 17, 1) < ":" Then
'We don't have a valid entry
OK = False
Else
OK = True
End If
Loop While Not OK
---------------------------

I was going to use :

---------------------------
Dim IWantNewer as Boolean

IWantNewer = InputBox("Enter Y if you want " & _
"newer files, " & vbCrLf & _
"or N if not", _
"Newer files ?", _
"N")
---------------------------

but Tom suggests a userform. How do I code that ?

IWantNewer = UserForm(....???)


Help !


RClay AT haswell DOT com