ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code Snippet - Forms from Control Box toolbar (https://www.excelbanter.com/excel-programming/435259-code-snippet-forms-control-box-toolbar.html)

Tim Childs[_2_]

Code Snippet - Forms from Control Box toolbar
 
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



Mike H

Code Snippet - Forms from Control Box toolbar
 
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

"Tim Childs" wrote:

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


.


Tim Childs[_2_]

Code Snippet - Forms from Control Box toolbar
 
Hi Mike

Thanks for that - worked a treat.

Tim

"Mike H" wrote in message
...
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

"Tim Childs" wrote:

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


.





All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com