Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 905
Default How to reorder/rename modules?

As I developed and reorganized VBA code, I inserted new modules, which were
numbered sequentially, e.g. Module1, Module2, Module3.

In hindsight, I would like the modules in the order Module3, Module1,
Module2.

Then I would like to rename them in sequential order again; that is,
Module3 - Module1, Module1 - Module2, and Module2 - Module3.

Even better, I would like to give each module a more descriptive name.

How can I do that?

Of course, if I don't mind calling the modules 4, 5 and 6, I can simply
insert new modules, cut-and-paste the text appropriately, then remove
modules 1, 2 and 3.

Alternatively, in this case, the Excel worksheets have nothing useful.
(Their contents are created by the macros.) So I could simply create a new
workbook, insert modules 1, 2 and 3, then cut-and-paste the text from one
workbook into appropriate modules in the other.

But I wonder if I am overlooking the obvious and much more straight-forward
way to accomplish this.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default How to reorder/rename modules?

Here are a couple of references you can browse. The both indicate that you
can prettymuch do what you want as far as naming the standard modules.

http://www.cpearson.com/Excel/codemods.htm

http://www.aspfree.com/c/a/VB.NET/Pr...als-Using-VBA/


"Joe User" <joeu2004 wrote in message
...
As I developed and reorganized VBA code, I inserted new modules, which
were numbered sequentially, e.g. Module1, Module2, Module3.

In hindsight, I would like the modules in the order Module3, Module1,
Module2.

Then I would like to rename them in sequential order again; that is,
Module3 - Module1, Module1 - Module2, and Module2 - Module3.

Even better, I would like to give each module a more descriptive name.

How can I do that?

Of course, if I don't mind calling the modules 4, 5 and 6, I can simply
insert new modules, cut-and-paste the text appropriately, then remove
modules 1, 2 and 3.

Alternatively, in this case, the Excel worksheets have nothing useful.
(Their contents are created by the macros.) So I could simply create a
new workbook, insert modules 1, 2 and 3, then cut-and-paste the text from
one workbook into appropriate modules in the other.

But I wonder if I am overlooking the obvious and much more
straight-forward way to accomplish this.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 905
Default How to reorder/rename modules?

"JLGWhiz" wrote:
you can prettymuch do what you want as far as naming
the standard modules.
http://www.cpearson.com/Excel/codemods.htm


Thanks for the pointers. I stopped reading and decided not to pursue this
further after seeing this caveat on one of Peason's web pages:

"CAUTION: Many VBA-based computer viruses propagate themselves by creating
and/or modifying VBA code. Therefore, many virus scanners may automatically
and without warning or confirmation delete modules that reference the
VBProject object, causing a permanent and irretrievable loss of code.
Consult the documentation for your anti-virus software for details."


----- original message -----

"JLGWhiz" wrote in message
...
Here are a couple of references you can browse. The both indicate that
you can prettymuch do what you want as far as naming the standard modules.

http://www.cpearson.com/Excel/codemods.htm

http://www.aspfree.com/c/a/VB.NET/Pr...als-Using-VBA/


"Joe User" <joeu2004 wrote in message
...
As I developed and reorganized VBA code, I inserted new modules, which
were numbered sequentially, e.g. Module1, Module2, Module3.

In hindsight, I would like the modules in the order Module3, Module1,
Module2.

Then I would like to rename them in sequential order again; that is,
Module3 - Module1, Module1 - Module2, and Module2 - Module3.

Even better, I would like to give each module a more descriptive name.

How can I do that?

Of course, if I don't mind calling the modules 4, 5 and 6, I can simply
insert new modules, cut-and-paste the text appropriately, then remove
modules 1, 2 and 3.

Alternatively, in this case, the Excel worksheets have nothing useful.
(Their contents are created by the macros.) So I could simply create a
new workbook, insert modules 1, 2 and 3, then cut-and-paste the text from
one workbook into appropriate modules in the other.

But I wonder if I am overlooking the obvious and much more
straight-forward way to accomplish this.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rename Modules Joe K. Excel Programming 1 November 9th 07 03:05 PM
Need Code to rename standard modules davidm Excel Programming 5 March 27th 06 11:36 AM
Need Code to rename standard modules davidm Excel Programming 0 March 27th 06 04:26 AM
How can we rename modules? StargateFanFromWork[_3_] Excel Programming 4 January 26th 06 07:41 PM
Rename Modules Ian Excel Programming 6 March 29th 05 02:29 PM


All times are GMT +1. The time now is 04:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"