Forum Discussion

ubarnes's avatar
ubarnes
Copper Contributor
Nov 14, 2019

Any VBA Macro experts available to point me in the right direction with a custom code?

I'm trying to build a macro through VBA to essentially grab user data off of my website that was entered by a user and sending the information to a spreadsheet.  This is just the first step in a list of steps that I am trying to accomplish.  I tried web query and it doesn't work the way I need it to I also have the option to EXPORT from my word press site but it is an extra step if I have to do it that way.

 

Example:

https://PlayInCollege.info/profile/1205

 

The link has the user data that I want to extract and import 

 

 

 

1 Reply

  • ubarnes's avatar
    ubarnes
    Copper Contributor

    Code below is what I have so for it simply opens the link in IE automatically, so once it opens it needs to grab the information and insert it into another sheet in my workbook.

     

    Public Sub GetValueFromBrowser()
    Dim ie As Object
    Dim URL As String
    Dim name As String

    URL = Worksheets("Recruit Link").Range("A1").Value
    Set ie = CreateObject("InternetExplorer.Application")

    With ie
    .Silent = True
    .Visible = 1
    .navigate URL
    While .Busy Or .readyState <> 4
    DoEvents
    Wend
    End With
    End Sub

Resources