I'm interested in why why following line ("Sheets("Euro_usd").Columns("A").End(xlDown).Offset(1, 0).Value = EURO_USD.t_date")
causes an
"Application defined or object defined error"
Replacing the code with the equivalent : Sheets("Euro_USD").Cells(rows.Count, "A").End(xlUp).Offset(1, 0).Value = EURO_USD.t_date
makes the error to dissapear.
Why is the error appearing? Does it have to do with that the end(xldown) for columns property is already occupied in the stack( not sure on terminology ) and thus the new request is generating an error?
Private Sub run() ' run the whole operation
Dim HTTP_Req As Object: Set HTTP_Req = New HTTP_Req
Dim EURO_USD As Object: Set EURO_USD = New EURO_USD
If Sheets("EURO_USD").Columns("A").End(xlDown).Value = DateValue(EURO_USD.t_date) Then
Debug.Print "Date already exist"
Else
Sheets("Euro_usd").Columns("A").End(xlDown).Offset(1, 0).Value = EURO_USD.t_date <-- Error here!
End If
End Sub