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: 36
Default Error Handling with Worksheetfunction.Match

Hello,
I am having trouble with error handling. Not sure how much of the code to
include here, as I cant really tell where the issue is. Heres the sub
routine where its breaking down:
===========
MoveData:
On Error GoTo BadProjectName
ToRowNum = Application.WorksheetFunction.Match(ProjNme,
ToRng.Columns(1).Cells, 0)

On Error GoTo IrregularVendor
ToColNum = Application.WorksheetFunction.Match(VendNme, ToRng.Rows(1).Cells,
0) ***err on this line***

On Error GoTo 0
ToRng.Cells(ToRowNum, ToColNum).Value = Rslt

IrregularVendor:
On Error GoTo 0
Return
============
The problem is that, the second time that it encounters an irregular vendor,
I get a run time error (Unable to get the Match property of the
WorksheetFunction class). The fact that it works once leads me to believe
that some sort of setting is being retained, but I can't figure out what it
could be. Ive tried inserting err.clear in various places, with no luck.
If anyone has any suggestions, please let me know.

Excel07, XPPro, VB6.5
--
Mike Lee
McKinney,TX USA
 
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
worksheetfunction.match Li Jianyong[_2_] Excel Programming 11 March 10th 10 10:07 PM
Match Error Handling CB Excel Programming 2 September 4th 08 01:16 AM
Error handling with a handling routine ben Excel Programming 0 March 15th 05 03:01 PM
Error Handling with a Match Function. Hari Prasadh Excel Programming 5 February 2nd 05 04:11 PM
worksheetfunction.match David Robinson[_3_] Excel Programming 4 November 15th 03 06:35 PM


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