Results 1 to 35 of 35

run time error 1004

Threaded View

  1. #1
    Registered User
    Join Date
    04-22-2011
    Location
    NY, NY
    MS-Off Ver
    Excel 2007
    Posts
    25

    run time error 1004

    hello all,

    I have isolated a piece of code that seems to be giving me problems. I tried debugging with no luck. I believe the error lies in when im setting comp = . Any red flags come to mind when looking at my code ? Thanks in advance

    Sub comp()
    
        Dim comp_irange As Range
        Dim comp_mrange As Range
        Dim comp_mrange2 As Range
        Dim comp As Variant
    
     code......
    
    If IsError(comp) Then
        MsgBox "match not found"
        Else
        Set comp_irange = Sheets("MASTER").Range("C3:AF80")
        Set comp_mrange = Sheets("MASTER").Range("A3:A80")
        Set comp_mrange2 = Sheets("MASTER").Range("C1:AF1")
        comp = Application.WorksheetFunction.Index(comp_irange, Application.WorksheetFunction.Match(name, comp_mragne, 0), Application.WorksheetFunction.Match(input_date, comp_mragne2, 0))
        Sheets("PROMOTER_TEMPLATE2").Range("D16").Value = comp
        End If
    -Chris
    Last edited by cthorn112; 05-12-2011 at 03:23 PM.

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