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: 553
Default Error Handling to mitigate "Run Time Erorr 13 Type Mismatch"

I have a line of code that is failing due to a Run Time Error 13 Type
Mismatch. The code is as following:

If Application.HLookup(sh.Name, WorkSheetSelectForm.SheetExcludeArray, 2,
False) = 0 Then

Now I know why its failing. The term sh.Name does not exisit in the Array
that I am performing the Hlookup on. However, I need to warp error handling
around this so that the code will progress. I have tried wrapping a ISERROR
stmt around it to generate a boolean as a start. But I cannot get this to
work. When I do the following below in the Immediate Window I get a "Run
Time Error 1001Unable to get the Hlookup Property of the Worksheet Function
class"

?ISERROR(Application.worksheetfunction.HLookup(sh. Name,
WorkSheetSelectForm.SheetExcludeArray, 2, False) = 0)

What can I do in order to error handle this?

Thanks

 
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
"ByRef argument type mismatch" Error Baapi[_4_] Excel Programming 2 September 17th 05 12:47 AM
Run-time Error "13" - File Type Mismatch brentm Excel Programming 1 February 10th 05 05:09 PM
Help with Run-time error: "Type Mismatch" Metin Excel Programming 2 January 26th 05 02:11 PM
"FIND" generates "Type mismatch" error quartz[_2_] Excel Programming 5 November 16th 04 03:29 PM
Copying data to another worksheet gives "Type Mismatch" error TB[_3_] Excel Programming 6 July 28th 03 12:44 PM


All times are GMT +1. The time now is 02:52 AM.

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

About Us

"It's about Microsoft Excel"