Hi,
I have this macro that runs when I open the workbook, but I also want it to run automatic every second or third hour after that as well.
This is the macro I use:
Private Sub Workbook_Open()
Dim ohtm As Object: Set ohtm = CreateObject("htmlFile")
Dim lcell As Long
Dim data(1 To 10) As Variant
' Dolphin Group
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", "http://norma.netfonds.no/ppaper.php?paper=DOLP.OSE", False
.send
ohtm.body.innerhtml = .responsetext
End With
With ohtm.getelementbyid("updatetable1")
With .Rows(2)
For lcell = 1 To 9
data(lcell) = .Cells(lcell).innertext
Next lcell
End With
End With
data(10) = Now()
With Sheets(1).Cells(1, 1)
.Resize(1, 10).Offset(.CurrentRegion.Rows.Count).Value = data
End With
End sub
Is there a way where I can modify this code to make it work as wanted?
Regards
Øystein Breivik
Bookmarks