title: "User-defined type not defined" error for a simple code in excel-VBA
body: <p>I wrote a simple code to open my browser from Excel-VBA with help of <a href="https://codingislove.com/browser-automation-in-excel-selenium/" rel="nofollow noreferrer">Selenium</a> below; However, I got an error that says: "Compile Error: User-defined type not defined".</p>
  
  <p>I tried to go to the references and add WebDriver to my Excel, but "References" option is not available under Tools category in my Excel. </p>
  
  <pre><code>Public Sub seleniumtutorial()
  Dim bot As New WebDriver
  bot.Start "internet explorer", "http://google.com"
  bot.Get "/"
  bot.TakeScreenshot.SaveAs (ActiveWorkbook.Path + "/screenshot.jpg")
  bot.Quit
  'quit method for closing browser instance.
  End Sub
  </code></pre>