+ Reply to Thread
Results 1 to 5 of 5

How to Rename a Module

  1. #1
    Registered User
    Join Date
    09-17-2008
    Location
    Europe
    Posts
    48

    How to Rename a Module

    Is it possible to renumber a module. Example i want to change Module3 to Module2. How can i do it?


    regards,

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: How to renumber a Module

    Make sure you have the properties window open in the VBA Editor (press F4 to view if not) and click on the module. You can then change it's name in the properties window.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Valrico, FL USA
    MS-Off Ver
    Excel 2016
    Posts
    358

    Re: How to renumber a Module

    Make sure the properties pane is displayed by pressing F4 in the VB Editor.
    Activate the Name box and type the desired name.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to renumber a Module

    Hello makku,

    You can change the name of module to whatever you want, as long as you follow these rules: The name must start with and alpha character and can only contain letters, numbers, hyphens, and underscore characters. The length can not be more than 31 characters in length.

    To change the module name, click the module you want to change. Go to the "Name" property in the Properties window. If this window is not displayed, press "F4" to display it. Change the name and save your changes.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: How to renumber a Module

    My tip is to name something meaningful and not toooo complex, as your need to find it one day ...

    if you read some of my codes Your see i am very careful and name my own way, works for me and i never get mixed up

    ie

    myColour_CELLS
    myMove_IT
    my_Split_NAMES

    as you see the naming is for the sub routines really, the modules i would tag as

    mod_myColour_CELLS
    mod_myMove_IT
    mod_my_Split_NAMES

    Hope that helps and shows what I do to keep things in order, remember done over cook the amount of modules as that’s not a good thing to do so try to ground codes in modules that are related

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1