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.
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.
- Right Click on the Tool box and click on Additional Controls.
- Select the Microsoft Web Browser in Additional Controls window.
- Web Browser control will be added in the Tool box
- Drag the Web browser on the user form.
- Create a Text box to search or typing the URL
- Create a Command Button to search.
- Double Click on the command button and put the below given code-
Private Sub CommandButton1_Click() Me.WebBrowser1.Navigate Me.TextBox1.Value End Sub
Click here to download this Excel workbook.