424 Error - Object Required

tbucci

New Member
Joined
Oct 8, 2010
Messages
6
Hi, these procedures belong to a rather long process, so I've pulled out only what I think is applicable. The first two procedures work fine. The second two procedures should work in the same way, only they don't. Instead, I receive a 424 on line 1 of Sub TransferAssociate(MyCell).

So far nothing I've researched seems to address this. So frustrating! Are there any thoughts about what I might be missing?

Thanks!

Dim TaskCell As Range<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
Dim MyCell As Range
<o:p> </o:p>
Sub TransferData(Year)
<o:p> </o:p>
'Loops through each cell consecutively under the "Region" heading.<o:p></o:p>
'Calls TransferEntry for specific Region
<o:p> </o:p>
Workbooks("PMO Training Log.xls").Activate<o:p></o:p>
Worksheets(Year).Activate<o:p></o:p>
Range(Range("A1:P3").Find("Region").Offset(RowOffset:=1).End(xlDown), _<o:p></o:p>
Range("A1:P3").Find("Region").Offset(RowOffset:=1)).Select<o:p></o:p>
For Each TaskCell In Selection<o:p></o:p>
If TaskCell.Value = Region Then _<o:p></o:p>
Call TransferTaskEntry(TaskCell)<o:p></o:p>
Next TaskCell
<o:p> </o:p>
End Sub<o:p></o:p>
<o:p> </o:p>
Sub TransferTaskEntry(TaskCell)<o:p></o:p>
<o:p> </o:p>
'Copies the appropriate cells in the Year sheet and pastes them in the next row on Training Report<o:p></o:p>
<o:p> </o:p>
Range(TaskCell.Offset(ColumnOffset:=-1), TaskCell.Offset(ColumnOffset:=11)).Select<o:p></o:p>
Selection.Copy<o:p></o:p>
Workbooks("Training Report.xls").Worksheets("Sheet1").Range("A65536").End(xlUp).Offset(RowOffset:=1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _<o:p></o:p>
:=False, Transpose:=False<o:p></o:p>
<o:p></o:p>
End Sub
<o:p> </o:p>
Sub CreateIndividualWB
<o:p> </o:p>
Workbooks("Training Report.xls").Worksheets("Sheet1").Activate<o:p></o:p>
Range(LastCell.End(xlUp), LastCell).Select<o:p></o:p>
<o:p></o:p>
For Each MyCell In Selection<o:p></o:p>
If MyCell.Value = Associate Then _<o:p></o:p>
TransferAssociate (MyCell)<o:p></o:p>
Next MyCell
<o:p> </o:p>
End Sub
<o:p> </o:p>
<o:p> </o:p>
Sub TransferAssociate(MyCell)<o:p></o:p>
<o:p></o:p>
Range(MyCell, MyCell.Offset(ColumnOffset:=12)).Select<o:p></o:p>
Selection.Copy<o:p></o:p>
NewAssociateBook.Worksheets("Sheet1").Activate<o:p></o:p>
Worksheets("Sheet1").Range("A65536").End(xlUp).Offset(RowOffset:=1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _<o:p></o:p>
:=False, Transpose:=False<o:p></o:p>
<o:p> </o:p>
End Sub
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
May be
Code:
If MyCell.Value = Associate Then _
TransferAssociate (MyCell.Address)
Bue
 
Upvote 0
Yes, this does change from value to address, but unfortunately I still receive the 424 error in the same place.
 
Upvote 0
And now:
Code:
Range(MyCell, Range(MyCell).Offset(ColumnOffset:=12)).Select
Or
Code:
Range(MyCell).Resize(1, 12).Select

And note that ".select" is unnecessary, you may use directly Range(MyCell).Resize(1, 12).copy
Bye
 
Upvote 0

Forum statistics

Threads
1,216,750
Messages
6,132,504
Members
449,730
Latest member
SeanHT

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