Results 1 to 5 of 5

Runtime 424 error

Threaded View

  1. #1
    Registered User
    Join Date
    07-20-2015
    Location
    Utrecht, The Netherlands
    MS-Off Ver
    2010
    Posts
    10

    Runtime 424 error

    I am encountering a runtime 424 Object required error error with the following code and tearing my hair out. Any help in identifying the possible reason for the error would be much appreciated.

    Purpose: The code takes data from a particular cell, checks whether its 'AAA' or 'BBB' or not and if it is taking the next cell and concatenating __1111 to it. The concatenated value is then posted in a separate cell

    Dataset (last two columns are used)
    NV B AEX AAA 123
    NV B AEX AAA 456
    XO B CAXE BBB 312
    XO B CAXE CCC 334
    BL B EDXE DDD 555

    Sub otc()
    
    MsgBox "Please make sure mapping is updated"
    
    Dim rowcount, colcount1, colcount2, filledrowcount As Integer
    Dim cprid, riskname, riskid As String
    Dim lookuprange, lookuprange2 As Range
    
    rowcount = 2
    colcount1 = 5
    colcount2 = 6
    
    filledrowcount = Worksheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row + 1
    
    Do Until rowcount - filledrowcount = 0
       Worksheets("Sheet1").Activate
         If Activesheet.Cells(rowcount.colcount1) = "AAA" Or Activesheet.Cells(rowcount.colcount1) = "BBB" Then
            cprid = Activesheet.Cells(rowcount.colcount2) & "__1111"
            Activesheet.Cells(rowcount.colcount1 + 40) = cprid
         End If
    
         rowcount = rowcount + 1
    
    Loop
    
    End Sub
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by 6StringJazzer; 07-22-2015 at 11:08 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Runtime error '1004': Paste special method of range class error.
    By Daryl Zer0 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-05-2014, 01:44 AM
  2. [SOLVED] VBA Error: Runtime Error 1004: AutoFilter method of Range class failed
    By jl22stac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2013, 07:27 PM
  3. [SOLVED] Range error in code, runs alone but not inside my full program, giving runtime error 1004
    By charizzardd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-23-2012, 03:34 PM
  4. Defining Array - Runtime error 9, Subscript out of range error
    By MaartenW in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-03-2012, 07:32 AM
  5. runtime error 3265 error in a VBA Query to pull info from ERP Database
    By NBVC in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-12-2010, 03:59 PM
  6. Excel xmlHTTP object error message - system/runtime error
    By Porky2007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2007, 09:36 AM
  7. Excel 2003 Macro Error - Runtime error 1004
    By Cow in forum Excel General
    Replies: 2
    Last Post: 06-07-2005, 09:05 AM

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