Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
546 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Hi Andy, I learnt so much from your vba classes and want to thank you so much for such great videos. I need your help to sove one of the issue is that i am running loop to open multiple pages on differebt tabs in internet explorer using vba and checking 2 option on website but after i navigate to second page it still again checking the option on first page please check the code given below for your reference.
On my excel sheet range("A2") = BOMDXB, range("B2") = 1-dec-17, range("C2") = 10-dec17
Sub mmtlink()
Dim IE As New SHDocVw.InternetExplorer
Dim st As String
Dim htmldoc As MSHTML.HTMLDocument
Dim all As MSHTML.IHTMLElementCollection
Dim one As MSHTML.IHTMLElement
Dim i As Long, d As Long, b As Long
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
d = Range("c2") - Range("b2") + 1
For i = 1 To d
st = Application.WorksheetFunction.Text(Range("b2") + i - 1, "ddmmmyyyy")
If i = 1 Then
IE.navigate "https://www.makemytrip.com/air/search?tripType=O&itinerary=" _
& Left(Range("A2"), 3) & "-" & Right(Range("A2"), 3) _
& "-D-" & st & "&paxType=A-1&cabinClass=E"
Else
IE.Navigate2 "https://www.makemytrip.com/air/search?tripType=O&itinerary=" _
& Left(Range("A2"), 3) & "-" & Right(Range("A2"), 3) _
& "-D-" & st & "&paxType=A-1&cabinClass=E", 2048
End If
Do While IE.Busy = True Or IE.readyState <> 4
Loop
Set htmldoc = IE.document
htmldoc.getElementById("Non stop").Click
Set all = htmldoc.getElementsByClassName("sortbytype")
st = "from " & Left(Range("A2"), 3) & " (early)"
For Each one In all
If one.getAttribute("Innertext") = st Then
one.Click
Exit For
End If
Next one
Next i
End Sub
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.