Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.
Option Explicit
#If VBA7 Then
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" _
Alias "URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#Else
Private Declare Function URLDownloadToFile Lib "urlmon" _
Alias "URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#End If
Sub GetEndxURL()
Dim strURL As String,excFile As String
Dim lngRetVal As Long
strURL =...
Option Explicit
#If VBA7 Then
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" _
Alias "URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#Else
Private Declare Function URLDownloadToFile Lib "urlmon" _
Alias "URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#End If
Sub GetEndxURL()
Dim strURL As String,excFile As String
Dim lngRetVal As Long
strURL = "https://..........." 'Excel dosyanızın URL si
excFile="C:/.....ExcelFileName.xls" 'Excel dosyanızın kaydedileceği yol ve yeni adı
lngRetVal = URLDownloadToFile(0, strURL, excFile, 0, 0)
End Sub
Sub ClickWebButton()
Dim oIE As InternetExplorer
Dim oHDoc As HTMLDocument
Dim Web_URL As String
Web_URL="....." 'Site url si
Set oIE = New InternetExplorer
With oIE
.Visible = False
.Navigate Web_URL
End With
Do While oIE.Busy = True Or oIE.ReadyState <> 4
DoEvents
Loop
Set oHDoc = oIE.Document
With oHDoc
.getElementById("Burada buton id yazılacak").Click 'İndirme butonunun id ini bulmanız lazım(web sayfayı incele ile)
End With
oIE.Quit
Set oIE = Nothing
Set oHDoc = Nothing
End Sub