+ Reply to Thread
Results 1 to 4 of 4

compile error with Find function

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,166

    compile error with Find function

    I am trying to use the Find function within some VBA code but keep encountering a compile error. Code works fine on it's own as below but doesn't work within the VBA code. I can't figure out what part of code needs to be modified. Thanks

    The desired result in J2 = "Jim"

    the value in cell I2 = "Jim |Anderson"

    Working Function as follows:
    Please Login or Register  to view this content.
    VBA code
    Please Login or Register  to view this content.
    Last edited by maacmaac; 04-01-2009 at 12:06 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: compile error with Find function

    Your are using Find as if it were a worksheet function. Look at at Help for the VBA InStr function.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,166

    Re: compile error with Find function

    Found what I was looking for and was able to figure it with a little trial and error. I appreciate you pointing me in a direction to figure out the answer on my own rather than giving me the code straight up.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: compile error with Find function

    Good job, MM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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