LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default input box date type mismatch

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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error 13 type mismatch input box cluckers Excel Discussion (Misc queries) 1 October 28th 09 07:01 PM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Date Type Mismatch johncassell[_5_] Excel Programming 3 July 21st 05 09:44 AM
Date type mismatch Patti[_2_] Excel Programming 4 September 14th 04 05:15 PM
Type Mismatch on Date Cameron[_4_] Excel Programming 2 December 5th 03 01:56 PM


All times are GMT +1. The time now is 12:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"