title: Change from IE to MS Edge Browser, VBA web Scraping
body: <p>I currently use IE to do some web scraping, as you may be aware IE support will be coming to an end in September 2021. I now  want to update this bit of my code to use Windows Edge, however I am unsure how to do it.</p>
  <p>The rest of the code is fine the only bit I need to change is to use another web browser. Not everyone will have Chrome or Firefox installed so I have not gone with them. However MS Edge is updated to all window PC</p>
  <p>Ideally i would have liked it to use Edge or IE, check which is installed on PC and use that one. However I have no idea how to do it. I have tried to google the answer, however it mentions Shells and I am not to sure how I would write a code for that.</p>
  <p>PS I will be sending the worksheet out to other users so it needs to be able to work on their PC and not just mine.</p>
  <pre><code>Dim Html As HTMLDocument
  Dim objIE As Object
  Dim Y As Integer '''integer variable we'll use as a counter
  Dim result As String ''''string variable that will hold our result link
  Dim pageNumber As Long ''' Number of pages.
  Dim nextPageElement As Object '''page element
  Dim HtmlText As Variant '''for html data
  Dim myCounter As Long '''counting the number of loops data goes to sheet10 q2
  
  Dim wsSheet As Worksheet 
  Dim wb As Workbook
      Set wb = ThisWorkbook
           Set wsSheet = wb.Sheets(&quot;Sheet2&quot;)
   Y = 0 
  
  '''################ Internet Explorer ###################
  Set objIE = New InternetExplorer 'initiating a new instance of Internet Explorer and asigning it to objIE
        objIE.Visible = True 
  ''' Url to NAVIGATE is taken from sheet10 as is the number of pages
      objIE.navigate Sheets(&quot;Sheet10&quot;).Range(&quot;F2&quot;).Value &amp; Replace(Worksheets(&quot;Sheet10&quot;).Range(&quot;G2&quot;) &amp; Range(&quot;H2&quot;).Value, &quot; &quot;, &quot;+&quot;) 
  Do While objIE.Busy = True Or objIE.readyState &lt;&gt; 4: DoEvents: Loop '''wait here a few seconds while the browser is busy
  
      Set Html = objIE.document
          'The Parent Class is set in Sheet10 C2
          Set elements = Html.getElementsByClassName(Sheets(&quot;Sheet10&quot;).Range(&quot;C2&quot;)) ' parent CLASS
  '''FOR LOOP
      For Each element In elements
  </code></pre>
  <p>As always thanks in advance.</p>