+ Reply to Thread
Results 1 to 2 of 2

Application Match error 13

  1. #1
    Registered User
    Join Date
    10-31-2017
    Location
    Bogota, Colombia
    MS-Off Ver
    2016
    Posts
    1

    Question Application Match error 13

    I'm using Application.Match to get the row number of a value, and to fill a form with all data of the row. It works perfect when sought value is alphanumeric, but error 13 is returned if sought value is numeric. Why?

    Error occurs on line
    Please Login or Register  to view this content.
    I've tried with
    Please Login or Register  to view this content.
    but I got same error 13 with numeric values of textoCodigo

    Using IsError() returns false if looked up value is alphanumeric, and returns true if looked up value is numeric. Both values I want to find exist in the range

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Application Match error 13

    If you declare ultimafila As Variant, variable should receive Error value when no match.
    And the variable can be evaluated by IsError function.

    Run time error 13 will be raised when the variable is declared other than Variant, because it can not receive Error value.

    Please Login or Register  to view this content.
    Remember TextBox value is always String type, so when numeric, it should be converted like Val(Me.textoCodigo.Value).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Runtime error 1004 with Application.Worksheetfunction.Match
    By jeetkapadia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2017, 12:46 PM
  2. [SOLVED] Error 2042 for application.match
    By a.hudrea in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 03:41 AM
  3. Error 2042 on Application.Match formula
    By krazyhype19 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-05-2015, 03:25 AM
  4. Trying to use the application object with the match function, getting error 2015
    By cmurda in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-08-2014, 03:42 PM
  5. Error 2042 with Application.Match
    By mgurren in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-08-2013, 02:15 AM
  6. Application.Worksheetfunction.match ERROR
    By Guido Meng in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2013, 01:27 PM
  7. Object Required error on Application.Match function.
    By ctckark1 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-12-2011, 11:01 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1