Code Snippet - Forms from Control Box toolbar

T

Tim Childs

Hi

If someone has put radio buttons etc on a worksheet, what is the easiest way
to list these objects i.e. the object names for each object on the sheet

Thanks

Tim
 
M

Mike H

Hi,

Run this code and they will be listed in column A

Sub marine()
Dim OleObj As OLEObject
x = 1
For Each OleObj In ActiveSheet.OLEObjects
Cells(x, 1) = OleObj.Name
x = x + 1
Next OleObj
End Sub

Mike
 
T

Tim Childs

Hi Mike

Thanks for that - worked a treat.

Tim

Mike H said:
Hi,

Run this code and they will be listed in column A

Sub marine()
Dim OleObj As OLEObject
x = 1
For Each OleObj In ActiveSheet.OLEObjects
Cells(x, 1) = OleObj.Name
x = x + 1
Next OleObj
End Sub

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top