Web browser in User form
VBA

VBA: Web browser in the User Form

In this article you will learn how to use a web browser in the user form. You can search anything or open a website using the text box.

Web Browser in User form
Web Browser in User form

 

Below are the steps to create the web browser in the user form-

  • Go to the Visual basic editor (Press Alt+F11)
  • Open the Toolbox.
Open the Toolbox
Open the Toolbox

 

  • Right Click on the Tool box and click on Additional Controls.
Additional Controls Option
Additional Controls Option

 

  • Select the Microsoft Web Browser in Additional Controls window.
Additional Controls window
Additional Controls window

 

  • Web Browser control will be added in the Tool box
Web Browser control
Web Browser control

 

  • Drag the Web browser on the user form.
  • Create a Text box to search or typing the URL
  • Create a Command Button to search.
User form
User form

 

  • Double Click on the command button and put the below given code-

 

Private Sub CommandButton1_Click()

    Me.WebBrowser1.Navigate Me.TextBox1.Value

End Sub

 

Coding
Coding

 

Click here to download this Excel workbook.

 

Watch the step by step video tutorial:

PK
My Name is PK. I am founder of PK-AnExcelExpert.com. I have more than 10 years of experience in Data Visualization, Excel Automation and dashboard creation. Excel is my passion and I like to do always something innovative in Excel and share it with other people.
https://www.pk-anexcelexpert.com

Leave a Reply

Your email address will not be published. Required fields are marked *