lundi 19 août 2019

scraping vba excel current date

I need to get the date of the current day, for the realization of my project, I am stuck, I do not place it inside a variable to be able to work it, I would like that variable to be Date or in its default String.

Sub WEB()

     Dim IE As Object
     Dim allelements As Object

     Application.ScreenUpdating = False
     Set IE = CreateObject("InternetExplorer.Application")

     IE.navigate "http://www.fechadehoy.com/venezuela"
     Do Until IE.ReadyState = 4
     DoEvents
     Loop
     Application.Wait (Now + TimeValue("0:00:01"))
     IE.document.getElementById ("date")
     IE.Visible = True
     Set IE = Nothing
     Application.ScreenUpdating = True

 End Sub


The website is as follows http://www.fechadehoy.com/venezuela

Please I only need the date of this page I am not interested in any other element of the macro.

I have many doubts with the subject, as I commented, I just need to extract the current date and get it in a variable I appreciate your help.




Aucun commentaire:

Enregistrer un commentaire