Web Data Query in Excel

0

I work in a company and need to monitor the printer toner life on a daily basis ...

For this I created a monitoring worksheet, but I wanted a practical system, like this:

When I insert the web address into a worksheet cell, automatically next to the webpage appears ... This is to avoid going in the browser, look, and then enter the percentage.  But I wanted to type a frame inside the worksheet. For example: I put the address "google.com" in cell A7, there automatically the side appeared the page display. It is possible

    
asked by anonymous 09.10.2017 / 02:25

1 answer

0

1) Enter VBA

  • Enable Developer mode
  • Open VBA or press Alt + F11
  • 2) Add Userform

    In the Projects window, right-click and enter a Userform

    3)InsertWebBrowser

    InsidetheUserform,inserttheBrowser.

  • ClickFerramentasandthenControlesadicionais...
  • Orright-clickintheToolbox
  • WithinControlesAdicionais...,enableMicrosoftWebBrowser.WiththisthephotoofaplanetwillbeinsertedintheToolbox
  • InsertWebBrowserinsidetheUserformbyclickingontheplanet.
  • 4)InsertTextBox

    ClickthebuttonintheimagetoolboxandinserttheTextBox

    5)InsertButton

    Clicktheimagebuttonandenteracommandbutton.

    6)Code

  • ClicktoViewUserformCode
  • Enter the code.

    Private Sub CommandButton1_Click()
    Dim web_link As String
    
        web_link = TextBox1
        Me.WebBrowser1.Navigate web_link
    End Sub
    
  • 7) Result

    TheUserformcanbeimproved,forexample,byopeningawindowthatisresizedtotheentirescreen.AndtocalltheUserform,justaddsomebutton,forthisthereareseveraltutorials.

      

    Note:IftheWebBrowserdoesnotwork,read

    10.10.2017 / 15:09