I have been looking all over for something that you help explain what I am doing, but I can't seem to find anything that helps so maybe someone can tell me exactly that I am doing wrong,



Option Explicit

Public AccessLastRow, AmexLastRow, OthersLastRow, test As Variant
Public AccessParent As Integer


Sub Main()

Call Initialize
Call SetFormulaConditions
Call UseFormulas

Call Finalize

End Sub

Sub Initialize()


Range("AccessLastRow") = Sheets("Access").UsedRange.Rows.Count - Range("AccessDateAnchor").Row + 1

Range("AMEXLastrow") = Sheets("AMEX").UsedRange.Rows.Count - Range("AccessDateAnchor").Row
Range("OthersLastRow") = Sheets("Others").UsedRange.Rows.Count - Range("OthersDateAnchor").Row



'AccessLastRow = Range("AccessLastRow")
'AmexLastRow = Range("AmexLastRow")
'OthersLastRow = Range("OthersLastRow")


End Sub
Sub SetFormulaConditions()

Sheets("Access").Select

'Access

Range(Cells(Range("AccessParent").Row, Range("AccessParent").Column).Resize(AccessLastRow, 1)) = "AccessParents"
Range(Cells(Range("AccessBill").Row, Range("AccessBill").Column).Resize(AccessLastRow, 1)).Name = "Access"

Range("AccessParents").Formula = "=Sum(H10:M10)"

'AMEX

Sheets("AMEX").Select
Cells(Range("AMEXInvoice").Row, Range("AMEXInvoice").Column).Resize(AmexLastRow, 1).Name = "AMEXInvoice"
Cells(Range("AmexAmount").Row, Range("AmexAmount").Column).Resize(AmexLastRow, 1).Name = "AMEX"

I am getting the error Application defined or Object defined error from this particular line of code:

Range(Cells(Range("AccessParent").Row, Range("AccessParent").Column).Resize(AccessLastRow, 1)) = "AccessParents"
Any ideas will help, thanks in advance!

- JP