Runtime error 424 - Object required

emlucas88

New Member
Joined
Feb 12, 2014
Messages
6
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
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Try replacing...

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

with

Code:
Range("XFD8").Select

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,214,529
Messages
6,120,070
Members
448,943
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top