input box date type mismatch
It works fine as far as I can see. Where do you get the error, and what are
you typing in the inputbox.
BTW, his name is Tom Ogilvy!
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Matilda" wrote in message
...
Hi Guys - another newbie question. Seem to be a lot of similar ones around
this theme but can't see my problem excactly, so here goes:
User input date is used to find a match in a range of dates in the
following code:
res = InputBox("Please enter Start Date")
If IsDate(res) Then
dt = CDate(res) 'convert response to a date type
res1 = Application.Match(CLng(dt), Rows(6), 0)
rest of code
This works a treat (Thanks Tom Oliver!) in one application,
but have copied it to use in another and I get an error 2042 and type
mismatch in the second. I have formatted the target date range in the same
way in both (I thought) so am baffled.
Many TIA'a
Matilda
|