- Katılım
- 10 Aralık 2012
- Mesajlar
- 303
- Excel Vers. ve Dili
- Ofis 365
- Altın Üyelik Bitiş Tarihi
- 24-05-2024
Merhabalar,
web'den döviz kurlarını çekmeye çalışıyorum ancak otomatik oluşturduğum makro hata veriyor. Bunu nasıl düzeltebiliriz?
Makro dosyasını yükleyemedim. Makrom da bu;
Sub Makro1()
'
' Makro1 Makro
'
'
Columns("B:J").Select
Selection.ClearContents
Range("L2").Select
ActiveCell.FormulaR1C1 = "https://www.x-rates.com/table/?from=USD&amount=1"
Range("B4").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;https://www.x-rates.com/table/?from=USD&amount=1", Destination:=Range( _
"$B$4"))
.CommandType = 0
.Name = "?from=USD&amount=1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "2"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Columns("C
").Select
Range("D1").Activate
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("E5").Select
End Sub
web'den döviz kurlarını çekmeye çalışıyorum ancak otomatik oluşturduğum makro hata veriyor. Bunu nasıl düzeltebiliriz?
Makro dosyasını yükleyemedim. Makrom da bu;
Sub Makro1()
'
' Makro1 Makro
'
'
Columns("B:J").Select
Selection.ClearContents
Range("L2").Select
ActiveCell.FormulaR1C1 = "https://www.x-rates.com/table/?from=USD&amount=1"
Range("B4").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;https://www.x-rates.com/table/?from=USD&amount=1", Destination:=Range( _
"$B$4"))
.CommandType = 0
.Name = "?from=USD&amount=1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "2"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Columns("C
Range("D1").Activate
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("E5").Select
End Sub
Son düzenleme: