السلام عليكم
في هذا الكود ارجوا تغيير انترنت اكسبلور
الي الافتراضي ايا كان
وشكرا مقدما
Sub Logi1nNew_URL()
Dim ie As Object
Dim element As Object
Dim str1 As String
Dim str2 As String
Dim str3 As String
Dim lRow As Long
With Sheets("Sheet1")
str1 = .Range("ac2").Value: str2 = .Range("ad2").Value: str3 = .Range("ae2").Value
End With
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "http://student.moe.gov.eg/new/serch_students.aspx"
Do Until .ReadyState = 4: DoEvents: Loop
On Error Resume Next
.Document.All.Item("ctl00$ContentPlaceHolder1$TextBox1").Value = str1
.Document.All.Item("ctl00$ContentPlaceHolder1$TextBox2").Value = str2
.Document.All.Item("ctl00$ContentPlaceHolder1$TextBox3").Value = str3
For Each element In .Document.getElementsByTagName("input")
If element.Type = "submit" Then element.Click: Exit For
Next element
End With
End Sub