Results 1 to 7 of 7

Run-time error '1004' HELP!

Threaded View

  1. #1
    Registered User
    Join Date
    12-15-2010
    Location
    Greenville, South Carolina
    MS-Off Ver
    Excel 2007
    Posts
    60

    Run-time error '1004' HELP!

    Hello all,

    I have been banging my head against the wall trying to figure out why I am getting this error. I have checked to make sure the data types are the same in the cells and have been looking all over the internet to try and find some clue, but to no avail. ANY direction would be helpful! I turned the text red where it is giving me the Run-time error '1004': Unable to get the Find property of the worksheetfunction class.

    Sub Table_Relations()
    
        Range("E2").Select
        
        EndRow = ActiveCell.End(xlDown).Row
        
        Set TableID = Range("E2:E" & EndRow)
        Set TR = Range("G2:G" & EndRow)
        Set SearchRange = Range("D2:D" & EndRow)
        
        Total_Tables = TableID.Count
        
        For i = 1 To Total_Tables
        
            MyTable = Application.WorksheetFunction.Index(TableID, i, 1).Value
            
            For j = 1 To Total_Tables
                On Error GoTo FixIt
                    SearchTable = Application.WorksheetFunction.Index(SearchRange, j, 1).Value
                    AddTable = Application.WorksheetFunction.Index(TableID, j, 1).Value
                
                
                
                If Application.WorksheetFunction.Find(MyTable, SearchTable, 1) > 0 Then                
                    If Application.WorksheetFunction.Index(TR, i, 1).Value = "" Then
                    
                        Application.WorksheetFunction.Index(TR, i, 1).Value = AddTable
                    Else
                    
                        Application.WorksheetFunction.Index(TR, i, 1).Value = _
                            Application.WorksheetFunction.Index(TR, i, 1).Value & ", " & AddTable
                    End If
                        
    
                End If
    FixIt:
            Next
            
        Next
    End Sub
    Last edited by Decoderman; 07-27-2012 at 10:32 AM. Reason: solved

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