- Katılım
- 20 Aralık 2010
- Mesajlar
- 10
- Excel Vers. ve Dili
- İngilizce Excel 2003
Merhabalar,
Ekte görebileceğiniz excel sheet'de A1 ve B1'e gireceğim verilerle A2'de webden sorgulama yapacağım URL'yi oluşturuyorum.
Yapmaya çalıştığım makro bu URL'ye gidip oradaki WebTable=1'i çekecek.
Aşağıda bunu adres kısımın elle yazarak elde ettiğim makroyu görebilirsiniz.
Benim istediğim bu URL'yi kendisi A2 hücresinden okuyup A3 hücresine yapıştırması.
Ekte görebileceğiniz excel sheet'de A1 ve B1'e gireceğim verilerle A2'de webden sorgulama yapacağım URL'yi oluşturuyorum.
Yapmaya çalıştığım makro bu URL'ye gidip oradaki WebTable=1'i çekecek.
Aşağıda bunu adres kısımın elle yazarak elde ettiğim makroyu görebilirsiniz.
Benim istediğim bu URL'yi kendisi A2 hücresinden okuyup A3 hücresine yapıştırması.
Kod:
Sub Macro3()
'
' Macro3 Macro
' Macro recorded 24/12/2010 by mwtr065
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://edb.volvo.net/cgi-bin/wis2/vehspec5.cgi?func=1&svariants=&pkl=04&f1=5834&f2=00&f3=70463" _
, Destination:=Range("A13"))
.Name = "vehspec5.cgi?func=1&svariants=&pkl=04&f1=5834&f2=00&f3=70463_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 = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
