title: hta vbs populate drop down menu with files in folder
body: <p>Using an Onload command I can output the relevant files from a folder in a messagebox but cannot understand how to use that information to populate a drop down menu in the html code.</p>
  
  <pre><code>Sub Window_onLoad
      LoadDropDown
  End Sub
  
  Sub LoadDropDown
      Dim dir, foundFile
      dir = zipfolder
      Dim fileNames, fso, folder
      Set fso = CreateObject("Scripting.FileSystemObject")
      Set folder = fso.GetFolder(dir)
      For Each foundFile In folder.Files
          fileNames = foundFile.name
          If(Right(fileNames,4) = ".zip") then
          fileNames = Left(fileNames,(Len(fileNames)-4))
          Value = Value &amp; fileNames &amp; vbCr 
          MsgBox "inside sub Value : " &amp; Value
      End If 
      Next
  End Sub
  </code></pre>
  
  <p>This will display a msgbox for each file found with extension ".zip"</p>
  
  <p>The confusing part is how to display this information (on load) in a drop down menu???
  What am I missing from the below?</p>
  
  <pre><code>&lt;select id="test" name="test" onchange="LoadDropDown" style="width: 336px;"&gt;
          &lt;option value=""&gt;&lt;/option&gt;
          &lt;/select&gt;
  </code></pre>
  
  <p>Thank you in advance for any help!</p>
  
  <p>This is NOT the same as:
  <a href="https://stackoverflow.com/questions/17241275/how-to-output-all-sub-folder-to-a-drop-down-list-in-a-hta">How to output all sub-folder to a drop down list in a HTA?</a>
  They are not using a file filter and mouseover on populate is NOT what is required or even wanted.</p>