ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Is there a quick way to see which objects have code attached? (https://www.excelbanter.com/excel-programming/276859-there-quick-way-see-objects-have-code-attached.html)

Terri[_4_]

Is there a quick way to see which objects have code attached?
 
I have inherited a workbook with macros/visual basic
coding, that I need to make modifications to. Is there a
quick way to see what the macros are attached to, other
than right clicking on all of the excel objects, or
individually selecting them in the vb editor? I'd like to
see a listing of only the objects that have code attached
to them, and what the name of the routine is called.

Tom Ogilvy

Is there a quick way to see which objects have code attached?
 
Perhaps something like this:

for each shp in ActiveSheet.Shapes
if shp.OnAction < "" then
cells(rw,1).Value = shp.Onaction
cells(rw,2).Value = shp.name
rw = rw + 1
Next

--
Regards,
Tom Ogilvy




"Terri" wrote in message
...
I have inherited a workbook with macros/visual basic
coding, that I need to make modifications to. Is there a
quick way to see what the macros are attached to, other
than right clicking on all of the excel objects, or
individually selecting them in the vb editor? I'd like to
see a listing of only the objects that have code attached
to them, and what the name of the routine is called.




Terri[_4_]

Is there a quick way to see which objects have code attached?
 
Thanks for the tip -- I hadn't considered writing code to
find the objects. I'll try it!

-----Original Message-----
Perhaps something like this:

for each shp in ActiveSheet.Shapes
if shp.OnAction < "" then
cells(rw,1).Value = shp.Onaction
cells(rw,2).Value = shp.name
rw = rw + 1
Next

--
Regards,
Tom Ogilvy




"Terri" wrote in message
...
I have inherited a workbook with macros/visual basic
coding, that I need to make modifications to. Is there

a
quick way to see what the macros are attached to, other
than right clicking on all of the excel objects, or
individually selecting them in the vb editor? I'd like

to
see a listing of only the objects that have code

attached
to them, and what the name of the routine is called.



.



All times are GMT +1. The time now is 12:30 AM.

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