Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Runtime Error '1004'

Entries in a combobox are strings, so it sounds like Vlookup can't find the
match (a string won't match a date)

Dim results as Variant
results = Application.Vlookup(cDate(combobox1.Value),
Range("Sheet5!A1:F365"),4,False)
if iserror(results) then
msgbox combobox1.Value & " was not found"
else
msgbox results " is the result"
End if

--
Regards,
Tom Ogilvy

"Dean" wrote in message
ups.com...
to add to this (as I'm sure it will affect the answer), the list is a
list of Dates.



Reply
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
Runtime Error 1004 JB Bates[_2_] Excel Discussion (Misc queries) 5 December 29th 09 02:40 PM
Runtime Error '1004' [email protected] Excel Discussion (Misc queries) 2 July 18th 05 06:10 AM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Runtime error 1004 Ajit Excel Programming 2 January 13th 05 02:55 PM
Runtime error 1004 edreczk Excel Programming 1 November 4th 04 10:19 PM


All times are GMT +1. The time now is 11:39 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"