Kullanıcı adı ve şifre girilerek kullanılan sistemde aşağıdaki makroyu kullanarak webden veri çekmeye çalışıyorum. Explorerda birkaç saniye sonra yüklenen veri excelden makro ile çekerken sayfanın yüklenme aşamasındaki "Yükleniyor..." yazısını excele çekiyor, veriyi çekmiyor. "Application.Wait (Now + TimeValue("0:00:10"))" kullanmama rağmen veri alamadım. Bu konuda görüşlerinizi rica ediyorum.
Not:Ekran görüntüsü eklenmiştir.
Sub data()
web = Array("http://????.????????????.com/ISLEMLER/loginbak.asp?user_username=xxxxxxxxxx&user_password=123456")
For a = 0 To UBound(web)
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate web(a)
Do Until .ReadyState = 4: DoEvents: Loop
Do While .Busy: DoEvents: Loop
End With
Next
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://????.????????????.com/ISLEMLER//???????????.asp", Destination:=Range( _
"$A$1"))
.Name = "?????????????"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = True
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = True
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 2
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = True
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=True
Application.Wait (Now + TimeValue("0:00:10"))
End With
End Sub
Not:Ekran görüntüsü eklenmiştir.
Sub data()
web = Array("http://????.????????????.com/ISLEMLER/loginbak.asp?user_username=xxxxxxxxxx&user_password=123456")
For a = 0 To UBound(web)
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate web(a)
Do Until .ReadyState = 4: DoEvents: Loop
Do While .Busy: DoEvents: Loop
End With
Next
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://????.????????????.com/ISLEMLER//???????????.asp", Destination:=Range( _
"$A$1"))
.Name = "?????????????"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = True
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = True
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 2
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = True
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=True
Application.Wait (Now + TimeValue("0:00:10"))
End With
End Sub
