Changing Module Name

C

cogent

Hello

How can I change the names of the Modules from Module1, Module2, etc.? I
have enough now so that it is time to add more descriptive names.

Briefly, what is the programmer's perspective on organizing code in to the
modules? Do you put all of your code in one module? Or do you divide by
general function?

Is it unusual to have many modules?

Thank you.

W
 
F

Frank Kabel

Hi
try the following
- in the VBA editor hit F4 to open the property window
- select your module and change the name
 
H

Harald Staff

Hi

Make your properties explorer visible in the VBE, view menu. Then change the
module name in the Name property box.

As for coding standards, there are slightly fewer than there are programmers
<g>. But multiple modules are generally a very good thing. Keep things in
order and group them by some logic, and you'll end up with "personal style"
I think. I tend to end up with "functions" in one, "main code" in another
and specialities grouped in separate modules (formatting code, database
access code, reports code, ... )

HTH. Best wishes Harald
 
C

Chip Pearson

W,

In the VBA Editor, select the module in the Project Explorer
window, and press F4 to bring up the properties box. There,
change the Name property.

It is advisable to organize code in to a variety of modules,
based on general functionality of the code. It is not at all
unusual to have a large number of modules.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
T

Tom Ogilvy

just click on the module in the project explorer. If the properties window
is visible, just change the name property. If not, hit F4 to make it
visible.
 
B

Bob Phillips

and divide it up, don't overload your modules.

Many modules is a fact of life with object-oriented programming.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top