DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
With CreateObject("MSXML2.XMLHTTP")
.Open "get", "http://SB/AKDENIZ/?????.xls", False
.send
bnr = .responseStream
End With
Open "C:\Users\finance\Desktop\???.xls" For Binary As #1
Put #1, , bnr
Close #1
Sub Evn()
Dim i As Integer
Dim WShel As Object
Dim a As String
basla = Timer
Set WShel = CreateObject("WScript.Shell")
a = WShel.SpecialFolders("Desktop")
Const MsgText = "Dosyalar İndirilsin mi ?"
Const MsgHdr = "İnidiriliyor..."
If MsgBox(MsgText, vbYesNo Or vbMsgBoxRtlReading Or vbExclamation, MsgHdr) _
= vbYes Then
MkDir (a & "\Evn Download")
For i = 2 To 7
Cells(i, "C").Value = Right(Cells(i, "A"), 4)
URL$ = Cells(i, "A").Value
dosya$ = a & "\Evn Download" & "\" & Cells(i, "B").Value & "." & Cells(i, "c").Value
DownloadFile URL$, dosya$
'CreateObject("Wscript.shell").Run """" & dosya$ & """" - Dosyayı çalıştır...
Next i
End If
bitir = Timer - basla
MsgBox "İndirme işlemi " & Format(bitir, "00:00:00.00") & " sürede tamamlanmıştır. ", _
vbInformation + vbMsgBoxRtlReading, "Www.ExcelVBA.Net"
i = Empty
a = vbNullString
Set WShel = Nothing
End Sub
Function DownloadFile(ByVal URL$, ByVal LocalPath$) As Boolean
Dim XMLHTTP, ADOStream, FileName
On Error Resume Next: Kill LocalPath$
Set XMLHTTP = CreateObject("Microsoft.XMLHTTP")
XMLHTTP.Open "GET", Replace(URL$, "\", "/"), "False"
XMLHTTP.send
If XMLHTTP.statustext = "OK" Then
Set ADOStream = CreateObject("ADODB.Stream")
ADOStream.Type = 1: ADOStream.Open
ADOStream.Write XMLHTTP.responseBody
ADOStream.SaveToFile LocalPath$, 2
ADOStream.Close: Set ADOStream = Nothing
DownloadFile = True
Else
MsgBox "Bağlantı sağlanamadı", vbInformation, "Hata !"
End If
Set XMLHTTP = Nothing
End Function
URL$ = Cells(i, "A").Value
Allah sizlerden gerçekten razı olsun, o kadar güzel bilgiler paylaşıyor ve yardım ediyorsunuz ki eminim Türkiye'nin üretim ve rekabet gücü artıyordur. Dosyaları Desktop'a kopyalarken sorun olmuyor. Ancak şu şekilde kopyalamayı gerçekleştirmiyor. Bu bir teknik engel mi ? yoksa ben mi bir hata yapıyor olabilirim ?
C:\Users\finance\Documents\