ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Display ALL Names of Drawing Objects (https://www.excelbanter.com/excel-programming/371412-display-all-names-drawing-objects.html)

Corey

Display ALL Names of Drawing Objects
 
Is there a short code that would display ALL the names given by code to
drawing objects with in a worksheet.

I have placed approximately 800 different objects on a worksheet, they will
eventualy used in a code to display Not Display.
But firstly i had to NAME them individually to allow for the code.
Being 800 odd i want to make sure i have not missed any, so hence the reason
for the displaying of the objects names needed.

I would like them possibly to be displayed in a new worksheet so i can view
them.

Can anyone assist me?


--
Regards

Corey



NickHK

Display ALL Names of Drawing Objects
 
Corey,
There's the DrawingObjects collection you can loop through, printing .Name
in a suitable location.

Whilst obviously possible, do you really need 800/sheet ?
Can you not move or show/hide a few when/if needed ?

NickHK

"Corey" wrote in message
...
Is there a short code that would display ALL the names given by code to
drawing objects with in a worksheet.

I have placed approximately 800 different objects on a worksheet, they

will
eventualy used in a code to display Not Display.
But firstly i had to NAME them individually to allow for the code.
Being 800 odd i want to make sure i have not missed any, so hence the

reason
for the displaying of the objects names needed.

I would like them possibly to be displayed in a new worksheet so i can

view
them.

Can anyone assist me?


--
Regards

Corey





Corey

Display ALL Names of Drawing Objects
 
Any idea's for the below????


"Corey" wrote in message
...
Is there a short code that would display ALL the names given by code to
drawing objects with in a worksheet.

I have placed approximately 800 different objects on a worksheet, they
will eventualy used in a code to display Not Display.
But firstly i had to NAME them individually to allow for the code.
Being 800 odd i want to make sure i have not missed any, so hence the
reason for the displaying of the objects names needed.

I would like them possibly to be displayed in a new worksheet so i can
view them.

Can anyone assist me?


--
Regards

Corey




Tom Ogilvy

Display ALL Names of Drawing Objects
 
Sub ListDrawingObjects()
Dim sh As Worksheet
Dim sh1 As Worksheet
Dim drwng As Object
Set sh = Worksheets("Sheet1")
Worksheets.Add after:=Worksheets(Worksheets.Count)
Set sh1 = ActiveSheet
i = 0
For Each drwng In sh.DrawingObjects
i = i + 1
sh1.Cells(i, 1) = drwng.Name
sh1.Cells(i, 2) = drwng.TopLeftCell.Address(0, 0)
Next
End Sub

--
Regards,
Tom Ogilvy




"Corey" wrote in message
...
Any idea's for the below????


"Corey" wrote in message
...
Is there a short code that would display ALL the names given by code to
drawing objects with in a worksheet.

I have placed approximately 800 different objects on a worksheet, they
will eventualy used in a code to display Not Display.
But firstly i had to NAME them individually to allow for the code.
Being 800 odd i want to make sure i have not missed any, so hence the
reason for the displaying of the objects names needed.

I would like them possibly to be displayed in a new worksheet so i can
view them.

Can anyone assist me?


--
Regards

Corey







All times are GMT +1. The time now is 02:49 PM.

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