We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Function testEERegex() Dim oRE Dim oMatches Dim oMatch Dim Description, Mfg, GrangerID, MfgID Dim str As String Dim url Dim xml As Object ' MSXML2.XMLHTTP Dim result As String Dim x As Integer url = "http://www.grainger.com/search?searchQuery=RIP CLAW HAMMER 16" Set oRE = CreateObject("vbscript.regexp") oRE.Global = True oRE.Pattern = "<a href.*>(.*?)</a></p><p class=""productBrand"">(.*?)</p>.*?<span class=""productInfoValueList"">(.*?)</span>.*?<span class=""productInfoValueList"">(.*?)</span>" Set xml = GetMSXML ' grab webpage With xml .Open "GET", url, False .send End With str = xml.responseText Set oMatches = oRE.Execute(str) Sheet1.ListBox1.Clear x = 0 For Each oMatch In oMatches Description = Trim(oMatch.Submatches(0)) Mfg = Trim(oMatch.Submatches(1)) GrangerID = Trim(oMatch.Submatches(2)) MfgID = Trim(oMatch.Submatches(3)) ' now add the stuff to the listbox With Sheet1.ListBox1 .ColumnCount = 4 .ColumnWidths = "100;60;60;60" .AddItem .List(x, 0) = Description .List(x, 1) = Mfg .List(x, 2) = GrangerID .List(x, 3) = MfgID x = x + 1 End With
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Excel Macro update each line based on another worksheet||2||53|
|how i can add a progress bar with this code ?, anybody can help me?||10||49|
|Excel VBA Script||9||52|
|Combine Vlookup with indirect sheet reference||3||20|
Join the community of 500,000 technology professionals and ask your questions.