We help IT Professionals succeed at work.
Get Started

Extract Data from a website

Fordraiders asked
Last Modified: 2013-12-05
Excel vba 2010.

Thanks to byundt,

I have code directing me to a website.
Function GetIE() As Object
Dim IE As Object, oShApp As Object, oWin As Object
Set oShApp = CreateObject("Shell.Application")
For Each oWin In oShApp.Windows
    If TypeName(oWin.Document) = "HTMLDocument" Then
        Set IE = oWin
        Set oShApp = Nothing
        Set oWin = Nothing
        Exit For
    End If
If IE Is Nothing Then
    Set IE = CreateObject("InternetExplorer.Application")
End If
Set GetIE = IE
End Function

Sub test()
Dim IE As Object
Dim t As String
Set IE = GetIE()
t = "11509957"
IE.Navigate ("http://www.fastenal.com/web/products/detail.ex?sku=" & t & " ")
End Sub 

Open in new window

Once i'am at a website:
I need to know if there is way to extract data from a webpage...if i know what html code to look for..

in this case: but not the website above..
mboxCreate("hybris_idp", "communityName=Anonymous", "SKU=4YP37", "db_audience="

The vaue i'm wanting is the value after the

"SKU=<alphanumeric number>",

say to a textbox 2 on my userform...

Watch Question
Mechanical Engineer
Most Valuable Expert 2013
Distinguished Expert 2020
This problem has been solved!
Unlock 1 Answer and 12 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE