Results 1 to 9 of 9

"FIND" method Macro not working

Threaded View

  1. #1
    Registered User
    Join Date
    07-14-2008
    Location
    INDIA
    Posts
    78

    "FIND" method Macro not working

    Hi,
    Below is the code in which the macro is showing error
    Run time error '1004'
    Application-defined (or) Object defined error
    at
    Cells(currow, "C") = finalNum2
    Sub test()
    
    Dim finalNum2 As String
    dim D r as range
    Dim C As Range
    Dim myArray, myArray2
    Dim x As Integer
    
    myArray = Array("Project1", "Project2")
    myArray2 = Array("H", "P")
    
    For Each r In ActiveSheet.Range("F2:F100")
    For x = LBound(myArray) To UBound(myArray)
        Set C = r.Find(myArray(x), LookIn:=xlValues, MatchCase:=False)
           
           If Not C Is Nothing Then
                finalNum2 = finalNum & "-" & myArray2(x)
                Cells(currow, "C") = finalNum2
                exit for
           End If
        Next x
    Next r
    
    End Sub
    Last edited by TRJJK73; 12-15-2008 at 01:36 AM.

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