Not tested but try
Dim oXLApp As Object, oXLwb As Object, oXLws As Object
Dim lRow As Long
On Error Resume Next
Set oXLApp = GetObject(, "Excel.Application")
'If not found then create new instance
If Err.Number <> 0 Then
Set oXLApp = CreateObject("Excel.Application")
End If
Err.Clear
On Error GoTo 0
'Show Excel
oXLApp.Visible = True
'Open the relevant file
Set oXLwb = oXLApp.Workbooks.Open("B:\Test WB.xlsx")
'Set the relevant output sheet. Change as applicable
Set oXLws = oXLwb.Sheets("Output")
With Sheets(“Output”)
lRow = Cells(Rows.Count,1).End(xlUp).Row
End With
lRow = lRow + 1
I believe the problem with the line in red in post #9 is that you are using the variable oXLApp which you have earlier set as an Excel Application where as rows.count happens at the sheet level. Someone will correct me here I guess