Hello everyone,
I inherited a table that compares the exchange rate taken directly from the Internet to the one from the database of our system. Afterwards, on the page they added a line that I do not need and I do not want to compare, so I'm interested in how to delete it from the table?
My VBA code looks like this:
Sub Macro1()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.hnb.hr/tecajn/htecajn.htm", Destination:=Range("$C$5"))
.Name = "htecajn"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Range("C5").Select
ActiveCell.FormulaR1C1 = "Srednji tečaj"
Range("C6:C18").Select
Selection.TextToColumns Destination:=Range("C6"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
:=Array(Array(1, 9), Array(2, 9), Array(3, 1), Array(4, 9)), TrailingMinusNumbers:= _
True
Range("A4").Select
ActiveWorkbook.Connections("Tecajna_lista").Refresh
End Sub
Thank you in advanced
I inherited a table that compares the exchange rate taken directly from the Internet to the one from the database of our system. Afterwards, on the page they added a line that I do not need and I do not want to compare, so I'm interested in how to delete it from the table?
My VBA code looks like this:
Sub Macro1()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.hnb.hr/tecajn/htecajn.htm", Destination:=Range("$C$5"))
.Name = "htecajn"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Range("C5").Select
ActiveCell.FormulaR1C1 = "Srednji tečaj"
Range("C6:C18").Select
Selection.TextToColumns Destination:=Range("C6"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
:=Array(Array(1, 9), Array(2, 9), Array(3, 1), Array(4, 9)), TrailingMinusNumbers:= _
True
Range("A4").Select
ActiveWorkbook.Connections("Tecajna_lista").Refresh
End Sub
Thank you in advanced