Hi,
Here are 2 Subs:
1- ObjsList to display each object's name in column 6
2- ObjsValues to display each Textbox's name and Value.
call them both or separately
Hope this helps:
Option Explicit
Sub ObjsValues()
Dim ObjOle As OLEObject
Dim Rw
Dim Ws
Dim SrchCrit
Rw = 2 'just a row counter to write results in our sheet
Set Ws = ThisWorkbook.Worksheets("Feuil2") ' because of my french version :)
SrchCrit = "TEXTBOX" 'search criteria here = TEXTBOX you can change it to what ever you look for . in CAPITAL pls
For Each ObjOle In Ws.OLEObjects
If InStr(UCase(ObjOle.Name), SrchCrit) <> 0 Then ' if object name matches SrchCrit
Ws.Cells(Rw, 1) = ObjOle.Name ' Write Obj name
Ws.Cells(Rw, 2) = ObjOle.Object.Value ' Write Obj value !! for other objects like combobox, listbox, checkbox ... it will be different
Rw = Rw + 1 ' Next row
End If
Next
End Sub
And
Sub ObjsList()
Dim ObjOle As OLEObject
Dim Rw
Dim Ws
Dim SrchCrit
Rw = 2 'just a row counter to write results in our sheet
Set Ws = ThisWorkbook.Worksheets("Feuil2")
For Each ObjOle In Ws.OLEObjects
Ws.Cells(Rw, 6) = ObjOle.Name ' Write Obj name
Rw = Rw + 1 ' Next row
Next
End Sub
Toubkal.