• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Çözüldü Web'den veri çekme makrosu

  • Konbuyu başlatan Konbuyu başlatan nes432
  • Başlangıç tarihi Başlangıç tarihi
Katılım
10 Aralık 2012
Mesajlar
303
Excel Vers. ve Dili
Ofis 365
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:D").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
 
Son düzenleme:
Forumda bu konuyla ilgili bolca örnek var. Arama yaparsanız kolayca ulaşabilirsiniz.
 
Geri
Üst