Module name in

B

Bobby

Hi, when your are in the EXCEL code editor, you have on your left the
name of the modules.
I find anoying the fact of having to remember the module name or edit
one by one each modules to find for intense a piece of code as a
reference. Is there a better way to do it in that environment like
renaming the module with specific name?
Thank's ahead!.
 
B

Bob Phillips

You can rename the module.

Most of the people here probably group their macros into similar function
macros in different modules, and name the module accordingly. This makes it
much simpler to find.

You can also do a find, Ctrl-F, and set the Current Project option button,
which will search all modules.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
G

Gord Dibben

Bobby

To rename a module from Module1 to a more descriptive name.........

With VBE open, select the Module1 and View>Properties Window.

Change name at that point.

As Bob points out, group your macros by category in the named modules.


Gord Dibben Excel MVP
 
D

David McRitchie

and since you will be doing this a lot, you will notice the shortcut
for View, Properties Window is F4 as seen on the menu

and the name to change to the right of "(Name)" which shows your selected module.

You want to try to group the macros that would be used with each other
together so that minimize the number of modules that are open. So
grouping by category usually works for that as well as an obvious arrangement.
You want to close each module sometime during the day so that
they don't remain open forever.

If you lose track of where a macro is you can select the first module
in your project (workbook) and then do a FIND and check the
radio button that indicates search entire project (as opposed to current module).

The way I look for a macro is with the toolbar button as described
on http://www.mvps.org/dmcritchie/excel/toolbars.htm
If the macro is not private you can use Alt+F8 then use "Step Into"
if the "Edit" button is not available such as would be the case for
your hidden personal.xls
 
Top