Results 1 to 2 of 2

Runtime error 424 - Object required

This is a discussion on Runtime error 424 - Object required within the Excel Questions forums, part of the Question Forums category; Hiya I am very new to VBA and teaching myself through recording and editing macros and forums like this. I ...

  1. #1
    New Member
    Join Date
    Feb 2014
    Posts
    6

    Default Runtime error 424 - Object required

    Hiya

    I am very new to VBA and teaching myself through recording and editing macros and forums like this.

    I am really stuck however when trying to run a code, which works fine as part of a macro but when I link it to a command button, I get the following error -Runtime error 424 - Object required. I have run the macro line by line by F8 and it failes when it gets to the line where I try and get it to select cell XFD8

    Sheets("Pivot 6 Month").Select
    Range("XFD41").Select
    Selection.End(xlToLeft).Select
    ActiveCell.Offset(0, -1).Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Table").Select
    Select.Range("XFD8").Select
    Selection.End(xlToLeft).Select
    ActiveCell.Offset(0, -1).Select
    Selection.PasteSpecial Paste:=xlPasteValues

    It works fine in my earlir code, when I try and select cells in this manner but falls down at this point. Any help would be much appreciated!

    Thanks
    Emma

  2. #2
    MrExcel MVP
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    14,257

    Default Re: Runtime error 424 - Object required

    Try replacing...

    Code:
    Select.Range("XFD8").Select
    with

    Code:
    Range("XFD8").Select
    Hope this helps!
    Domenic Tamburino
    Microsoft MVP - Excel
    xl-central.com - "For Your Microsoft Excel Solutions"

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com