Userform
You said you had 4 inputboxes that received boolean values. I **asked**
You want to replace your four input boxes with a userform with 4
optionbuttons?
Your first example of getting a date has nothing to do with boolean values.
If you are only going to get one response, then you should probably use a
msgbox. Then the user only has to click, not type in a value.
Dim IWantNewer as Boolean
IWantNewer = InputBox("Do you want " & _
"newer files, " , vbYesNo) = vbYes
--
Regards,
Tom Ogilvy
"Robin Clay" wrote in message
...
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
|