+ Reply to Thread
Results 1 to 3 of 3

WorksheetFunction within macro

  1. #1
    Forum Contributor
    Join Date
    01-09-2009
    Location
    Cedar Hill, Tx
    MS-Off Ver
    Excel 2003
    Posts
    200

    WorksheetFunction within macro

    Howdy, folks:

    I need some ideas. I'm using the attached code and keep getting error '1004' pointing at the "application" statement. The vlookup function works fine within the worksheet. What am I doing wrong?

    Please Login or Register  to view this content.
    TIA.

    Bob

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: WorksheetFunction within macro

    Why not use the >Find method in VBA? Take a look at the VBA Help files for Find, the explanation & example code is quite good.

    Without knowing what your variables are it is hard to say what is causing the error
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    11-20-2009
    Location
    Raymond,WA
    MS-Off Ver
    Excel 2002
    Posts
    40

    Re: WorksheetFunction within macro

    I think you are using 'routeName' both as the name of a variable to be returned and of the range/table to be searched.
    Change one or the other and see if that works.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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