Home>Blogs>VBA>VBA: Web browser in the User Form
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
Meet PK, the founder of PK-AnExcelExpert.com! With over 15 years of experience in Data Visualization, Excel Automation, and dashboard creation. PK is a Microsoft Certified Professional who has a passion for all things in Excel. PK loves to explore new and innovative ways to use Excel and is always eager to share his knowledge with others. With an eye for detail and a commitment to excellence, PK has become a go-to expert in the world of Excel. Whether you're looking to create stunning visualizations or streamline your workflow with automation, PK has the skills and expertise to help you succeed. Join the many satisfied clients who have benefited from PK's services and see how he can take your Excel skills to the next level!
https://www.pk-anexcelexpert.com

Leave a Reply