Hello,
I am in the process of creating a HTA. I need to populate a pulldown menu from a collection of subfolders. In other words, I need to populate a pulldown with the names of the subfolders. I think a collection might work. Got the idea from:
'* File: scriptomatic.hta
'* Created: August 2002
'* Version: 1.0
'*
'* Description: Learning tool. Enables users to generate and run
'* WSH scripts (in VBScript) that use WMI to display
'* properties available through the Win32_ classes.
'*
'*
'* Copyright (C) 2002 Microsoft Corporation
It does seem as though what I am trying to do is much simpler than populating a pulldown from the enumeration of WMI classes. I just can't put it together from referring to the "scriptomatic.hta". The key points I see are:
Here within the <script language="vbscript"> :
strHTML = "<select onChange=""ComposeCode()"" name=ClassesPulldown>" &_
"<option value=""PulldownMessage"">Begin by selecting a class"
strHTML = strHTML & "</select>"
wmi_classes.insertAdjacentHTML "beforeEnd", strHTML
And here with in the <body>
<span id="wmi_classes"> </span>
At least that is what stood out as being a reference point to sort of do the same thing, only I only want to enumerate a list of subfolders to the pulldown.
I can get the collection like this:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("path to folder")
Set colSubfolders = objFolder.Subfolders
All I need now, is to have each subfolder name placed in a dropdown listbox.
Thank you for your time :-)
Student