Hi,
I would like to run below query every one minute. May I please seek help on how to do it
Sub webquery()
dt = Format(Now, "ddmmyyyyhhmmss")
url = "https://www.amfiindia.com/spages/NAVAll.txt?t=" & dt
With Worksheets("NAV_RawFormat").QueryTables.Add(Connection:="url;" & url, Destination:=Worksheets("NAV_RawFormat").Range("A1"))
.Name = "AMFI Query"
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
I would like to run below query every one minute. May I please seek help on how to do it
Sub webquery()
dt = Format(Now, "ddmmyyyyhhmmss")
url = "https://www.amfiindia.com/spages/NAVAll.txt?t=" & dt
With Worksheets("NAV_RawFormat").QueryTables.Add(Connection:="url;" & url, Destination:=Worksheets("NAV_RawFormat").Range("A1"))
.Name = "AMFI Query"
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub