Hi. I know that in VBA, a subscript out of range error when trying to reference an object means it cannot find it. Mine exists. Please help because I keep getting the error with my variable call which works in other parts of the code.
Here is the code:
Public Sub Pop_trans_amount(TEMPLATE_NAME As String, TempPath As String)
Set fso = CreateObject("Scripting.FileSystemObject")
totalpath = fso.BuildPath(TempPath & "\", "trans_amount.xls")
If fso.FileExists(totalpath) Then GoTo Populate
NewFile = TempPath & "\trans_amount.xls"
Sh_name = ActiveSheet.Name
Cnt = ActiveSheet.UsedRange.Rows.Count - 1
FullRange = ActiveSheet.Range(Range("A2:F2"), Range("A2:F2").End(xlDown)).Select
If Cnt > 3 Then
Workbooks(TEMPLATE_NAME).Activate <************THIS IS WHERE IT ERRORS
Sheets("3. Other Fees").Activate
Call Ins_Row("FullRange", Cnt - 4, "3. Other Fees")
Application.CutCopyMode = False
Thanks for the help!