title: How to use Shell.Application to eject a USB device on Windows XP?
body: <p>I'm new to coding and I have never used Visual Basic before.</p>
  <p>I was asked to write a script that ejects the USB drive.</p>
  <pre class="lang-vb prettyprint-override"><code>Public sub cmdClose_Click()
      'CreateObject(&quot;Shell.Application&quot;).NameSpace(&quot;E:&quot;).Self.InvokeVerb &quot;Eject&quot;
  End Sub
  </code></pre>
  <p>The above script that I found works on Windows 7 but not on XP.<br />
  If someone could give me an example of how to eject on Windows XP, that would be great.</p>