Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Type Mismatch


For some reason, I'm having a bit of a problem with this bit of code and
I can't figure out why:


Code:
--------------------
Set rngFindRange = baseBook.ActiveSheet.Range("H" & basePos, "BE500")
Set rngFoundCell = rngFindRange.Find(Selection.Value, "H" & basePos, xlValues, xlWhole, xlByRows, xlNext)
--------------------


I keep getting a type mismatch with that but I can't figure out why.
baseBook is a valid Workbook and basePos is a valid Long. Can anyone
help? Thanks in advance.


--
Raman325
------------------------------------------------------------------------
Raman325's Profile: http://www.excelforum.com/member.php...o&userid=24748
View this thread: http://www.excelforum.com/showthread...hreadid=383221

  #2   Report Post  
Posted to microsoft.public.excel.programming
jjk jjk is offline
external usenet poster
 
Posts: 42
Default Type Mismatch

Hi Raman,

You have specified a string for the parameter 'After' for the 'Find'
function.
The following should work.

Set rngFoundCell = rngFindRange.Find(Selection.Va*lue,
rngFindRange.Cells(1,1), xlValues, xlWhole, xlByRows, xlNext)

Regards,
Jayant

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
Type Mismatch [email protected] Excel Worksheet Functions 1 May 16th 07 03:29 PM
Type Mismatch Brad Excel Programming 2 May 2nd 05 04:49 PM
Type Mismatch on some PCs Delboy Excel Programming 8 January 17th 05 11:37 AM
Type mismatch Alan Beban[_4_] Excel Programming 0 February 4th 04 08:39 PM
Type Mismatch Phil Hageman[_3_] Excel Programming 2 January 9th 04 06:11 PM


All times are GMT +1. The time now is 04:07 AM.

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"