dhalliday
asked on
Using vbscript to read from an excel file and populate a drop down list
I have an excel file that contains a list of names in one row and the distinguished name in another.
I need to read the file and output the names into the drop down box while having the distinguished name be the value for the selection.
The following was my attempt, but was unsuccessful.
strXLpath = "c:\managers.xls"
Set objXL = CreateObject("Excel.Applic ation")
objXL.visible = False
Set objWb = objXL.WorkBooks.Open(strXL path)
objWb.MoveFirst
Do Until objWb.EOF
Set objOption = Document.createElement("OP TION")
objOption.Text = objXL.Rows(1).Value
objOption.Value = objXL.Rows(2).Value
mgrName.Add(objOption)
objWB.MoveNext
Loop
I need to read the file and output the names into the drop down box while having the distinguished name be the value for the selection.
The following was my attempt, but was unsuccessful.
strXLpath = "c:\managers.xls"
Set objXL = CreateObject("Excel.Applic
objXL.visible = False
Set objWb = objXL.WorkBooks.Open(strXL
objWb.MoveFirst
Do Until objWb.EOF
Set objOption = Document.createElement("OP
objOption.Text = objXL.Rows(1).Value
objOption.Value = objXL.Rows(2).Value
mgrName.Add(objOption)
objWB.MoveNext
Loop
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Regards,
Rob.