View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
FurRelKT FurRelKT is offline
external usenet poster
 
Posts: 42
Default How to read the contents of an OLEObject (dropdown list) in excel

I used this code

Sub listcontents()
Dim OLEObj As OLEObject
For Each OLEObj In ActiveSheet.OLEObjects
If TypeOf OLEObj.Object Is MSForms.HTMLSelect Then
Debug.Print OLEObj.Name
Debug.Print OLEObj.progID
End If
Next OLEObj


End Sub

to get the following return.

HTMLSelect1
Forms.HTML:Select.1

I would like to undertand.. as i know this is an OLEObject, i want to
read this list to other worksheet cells. Is that possible to read from
the list? This was a copy/paste from a secure website. the list came
over into excel as a dropdown list.

If more information is needed please ask. The solution i need to be
able to read the contents of this list and display them in another
sheet in the cells, say column A, rows 2 - x.

Thanks for any help.

Keri