ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Naming modules (https://www.excelbanter.com/excel-programming/405121-naming-modules.html)

No Name

Naming modules
 
Hi

Bit of a beginner here! I have a lot of modules in my personal workbook,
mostly set up by recording macros and then tweaking them.
My problem is that I've added and tweaked etc and now I have 19 modules -
called module 1 to module 19. The macros I use are scattered throughout
these, and I don't know which one does which bit without checking each one
individually. Is there any way of renaming modules or finding a certain
routine (say 'FixRightMinus') rather than looking at each module? I realise
it's probably a macro-management thing and I shouldn't have got into a bad
habit months ago!
Thanks.



Dave Peterson

Naming modules
 
Go into the VBE
hit ctrl-r to view the project explorer
Select & expand your project in the project explorer
Hit F4 to see each the properties window

Select a module
rename it
Don't duplicate the name of any procedure or function or workbook name or
built-in function/property.

If you hit ctrl-f (to find), you can specify the current project.

Andy wrote:

Hi

Bit of a beginner here! I have a lot of modules in my personal workbook,
mostly set up by recording macros and then tweaking them.
My problem is that I've added and tweaked etc and now I have 19 modules -
called module 1 to module 19. The macros I use are scattered throughout
these, and I don't know which one does which bit without checking each one
individually. Is there any way of renaming modules or finding a certain
routine (say 'FixRightMinus') rather than looking at each module? I realise
it's probably a macro-management thing and I shouldn't have got into a bad
habit months ago!
Thanks.


--

Dave Peterson

Bob Phillips

Naming modules
 
To name a module, select it in the Project Explorer window, then just change
the name in the Properties window.

You can find any procedure by just doing Ctl-F, entering the Name and
selecting Current Project from the Search buttons, or just entering the
procedure name in the Immediate window, and Shift-F2 should take you
straight there.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



<Andy wrote in message ...
Hi

Bit of a beginner here! I have a lot of modules in my personal workbook,
mostly set up by recording macros and then tweaking them.
My problem is that I've added and tweaked etc and now I have 19 modules -
called module 1 to module 19. The macros I use are scattered throughout
these, and I don't know which one does which bit without checking each one
individually. Is there any way of renaming modules or finding a certain
routine (say 'FixRightMinus') rather than looking at each module? I
realise it's probably a macro-management thing and I shouldn't have got
into a bad habit months ago!
Thanks.




DomThePom

Naming modules
 
Go to View / Properties Window (or F4) and rename module there

"Andy" wrote:

Hi

Bit of a beginner here! I have a lot of modules in my personal workbook,
mostly set up by recording macros and then tweaking them.
My problem is that I've added and tweaked etc and now I have 19 modules -
called module 1 to module 19. The macros I use are scattered throughout
these, and I don't know which one does which bit without checking each one
individually. Is there any way of renaming modules or finding a certain
routine (say 'FixRightMinus') rather than looking at each module? I realise
it's probably a macro-management thing and I shouldn't have got into a bad
habit months ago!
Thanks.




No Name

Naming modules
 
Thanks everyone - it's so easy when you know. I've been scouring the forums
for ages too!

Cheers!

"DomThePom" wrote in message
...
Go to View / Properties Window (or F4) and rename module there

"Andy" wrote:

Hi

Bit of a beginner here! I have a lot of modules in my personal workbook,
mostly set up by recording macros and then tweaking them.
My problem is that I've added and tweaked etc and now I have 19 modules -
called module 1 to module 19. The macros I use are scattered throughout
these, and I don't know which one does which bit without checking each
one
individually. Is there any way of renaming modules or finding a certain
routine (say 'FixRightMinus') rather than looking at each module? I
realise
it's probably a macro-management thing and I shouldn't have got into a
bad
habit months ago!
Thanks.







All times are GMT +1. The time now is 11:21 PM.

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