Greetings Peralva,
Not sure how one would predict the latest save date/time of the worksheet, but at least as it seems to me in checking the link a couple of times, the workbook (WB) remains a one-sheet WB, that is uploaded to the website with a consistent filename. If that is the case, how about just downloading the WB and working on it from within th e PC?
In a Standard Module:
Option Explicit
Private Declare Function URLDownloadToFileA Lib "urlmon" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Public Sub Example()
Dim sFolderPath As String
Dim sFullname As String
Dim WB As Workbook
sFolderPath = Environ("HOMEDRIVE") & Environ("HOMEPATH") & "\Downloads\"
'NOTE: I did NOT worry about overwriting the file.
If DownloadFile("https://www.anbima.com.br/informacoes/indicadores/arqs/indicadores.xls", sFolderPath & "indicadores.xls") Then
Set WB = Workbooks.Open(sFolderPath & "indicadores.xls", , True)
'import data needed here
'save full name for optional Kill
sFullname = WB.FullName
WB.Saved = True
WB.Close False
'Optional - delete workbook if not needed
Kill sFullname
Else
MsgBox "I goofed something and could not download the file", vbInformation, vbNullString
End If
End Sub
Private Function DownloadFile(URL As String, LocalFilename As String) As Boolean
DownloadFile = CBool(Not URLDownloadToFileA(0, URL, LocalFilename, 0, 0))
End Function
Hope that helps,
Mark