+ Reply to Thread
Results 1 to 20 of 20

Getting Run Time Error 424 object required

  1. #1
    Registered User
    Join Date
    08-19-2009
    Location
    Winnipeg, Manitoba, Canada
    MS-Off Ver
    Excel 2003
    Posts
    90

    Getting Run Time Error 424 object required

    Hello,

    I keep on getting the "Run Time Error 424 object required" yet the code seems to look fine .....I'm asking for it to look for the date and have stated which cell/range ... I don't get it

    Any suggestions ? please and thank you .....

    Please Login or Register  to view this content.
    Last edited by arvin; 01-11-2010 at 01:37 PM.

  2. #2
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    649

    Re: Getting Run Time Error 424 object required

    can you tell me what line your get the error on?

  3. #3
    Registered User
    Join Date
    08-19-2009
    Location
    Winnipeg, Manitoba, Canada
    MS-Off Ver
    Excel 2003
    Posts
    90

    Re: Getting Run Time Error 424 object required

    Opps ! ... so sorry ...

    the line is

    Please Login or Register  to view this content.
    Thank you in advance

    Arv

  4. #4
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    649

    Re: Getting Run Time Error 424 object required

    wb is not set. maybe you meant wbNormal or mb900.

  5. #5
    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: Getting Run Time Error 424 object required

    Try putting Option Explicit as the first line of the module, and see what happens.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    08-19-2009
    Location
    Winnipeg, Manitoba, Canada
    MS-Off Ver
    Excel 2003
    Posts
    90

    Re: Getting Run Time Error 424 object required

    wb is not set. maybe you meant wbNormal or mb900.
    That is not the case as this code is designed to exportt records from one wb into 2 other wb's (Normal records and 900 records)

    Try putting Option Explicit as the first line of the module, and see what happens.
    When I tried this i started to recieve a Compile Error: Variable not set....

  7. #7
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Getting Run Time Error 424 object required

    That's what blane245 was telling you: wb is not defined in your routine.
    Richard Schollar
    Microsoft MVP - Excel

  8. #8
    Registered User
    Join Date
    08-19-2009
    Location
    Winnipeg, Manitoba, Canada
    MS-Off Ver
    Excel 2003
    Posts
    90

    Re: Getting Run Time Error 424 object required

    Disregard the last post .... I'm an idiot!

    I forgot to type

    QUOTE]Option Explicit

    Public wb As Workbook[[/QUOTE]

    I resolved that issue .... but now I need can't transfer my records to the other wb's....

  9. #9
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    649

    Re: Getting Run Time Error 424 object required

    make sure that you are addressing the right wb when you are transferring the data.

  10. #10
    Registered User
    Join Date
    08-19-2009
    Location
    Winnipeg, Manitoba, Canada
    MS-Off Ver
    Excel 2003
    Posts
    90

    Re: Getting Run Time Error 424 object required

    Hi Blane245,

    Thank you ...and yes I am ... the issue is with the offsets.....I see data going into the wb's ...but not the right data

  11. #11
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    649

    Re: Getting Run Time Error 424 object required

    I may be poking around a bit, but note that .Offset is zero-based. Are you picking up the the right rows from rFind?

  12. #12
    Registered User
    Join Date
    08-19-2009
    Location
    Winnipeg, Manitoba, Canada
    MS-Off Ver
    Excel 2003
    Posts
    90

    Re: Getting Run Time Error 424 object required

    I may be poking around a bit, but note that .Offset is zero-based. Are you picking up the the right rows from rFind?
    Yes.... well I believe so

  13. #13
    Registered User
    Join Date
    08-19-2009
    Location
    Winnipeg, Manitoba, Canada
    MS-Off Ver
    Excel 2003
    Posts
    90

    Re: Getting Run Time Error 424 object required

    Currently... the only right thing...or data that is being transfered is the date .....

  14. #14
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    649

    Re: Getting Run Time Error 424 object required

    I don't think the looping is correct. Check to see if it ever executes.

  15. #15
    Registered User
    Join Date
    08-19-2009
    Location
    Winnipeg, Manitoba, Canada
    MS-Off Ver
    Excel 2003
    Posts
    90

    Re: Getting Run Time Error 424 object required

    ...I think you're right....

    Here is the revised code .... and I have attached a copy of the "Normal Records" wb .... to show the output ......


    Please Login or Register  to view this content.
    Attached Files Attached Files

  16. #16
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    649

    Re: Getting Run Time Error 424 object required

    It might be more straightforward to loop through all of the rows looking for the "CIC" and then doing the processing on those that match your criteria. The loop would start something like
    For rg in wb.Sheets(1).UsedRange.Rows

  17. #17
    Registered User
    Join Date
    08-19-2009
    Location
    Winnipeg, Manitoba, Canada
    MS-Off Ver
    Excel 2003
    Posts
    90

    Re: Getting Run Time Error 424 object required

    I wish it could be that easy my friend .....

    here's the issue .....

    I have to split the records based on "Service type" ...so, if the "service type" is "reg" or blank ...the records should into the Normal records wb ... and the "Service Type" of "900" should only go into the 900 records wb.....

    I can't wait until that rhum and coke tonite .....

  18. #18
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    649

    Re: Getting Run Time Error 424 object required

    Hope you had one for me, too! How about looping twice - once for Normal and once for 900?

  19. #19
    Registered User
    Join Date
    12-27-2009
    Location
    Paris, France
    MS-Off Ver
    Excel 2003
    Posts
    64

    Re: Getting Run Time Error 424 object required

    Hello,

    Maybe

    Please Login or Register  to view this content.
    Best regards.

    PMO
    Patrick Morange

  20. #20
    Registered User
    Join Date
    08-19-2009
    Location
    Winnipeg, Manitoba, Canada
    MS-Off Ver
    Excel 2003
    Posts
    90

    Re: Getting Run Time Error 424 object required

    For clairity reasons... I am marking this thread as "solved" .... as the original issue of "Run Time Error 424 object required " is solved. I will open a new thread to cover the new issue.

    Cheers to all that have helped me with this ....

+ 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