I am looking to use Access VBA to pull an Exchange rate table from a website into tblExchangeRates from this website, the table is on the right.
http://www.oanda.com/
But don't know the code.
I did record a macro in Excel to get the code but have been told it has to go into an exchange rate table in the database. The code I recorded is shown below:
Can anyone guide me please.
http://www.oanda.com/
But don't know the code.
I did record a macro in Excel to get the code but have been told it has to go into an exchange rate table in the database. The code I recorded is shown below:
Sub Macro1()
'
' Macro1 Macro
'
'
With ActiveSheet.QueryTables.Add(Connection:="URL;http://www.oanda.com", _
Destination:=Range("$A$1"))
.Name = "www.oanda"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 60
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Cells.Select
Cells.EntireColumn.AutoFit
Range("A1").Select
End Sub
Can anyone guide me please.