+ Reply to Thread
Results 1 to 5 of 5

How can I rename a module in VBA?

  1. #1
    Registered User
    Join Date
    06-23-2006
    Posts
    34

    How can I rename a module in VBA?

    I cant work out how to rename on of my sub modules?

    Does anyone know whether this is possible?

    thanks

  2. #2
    Chip Pearson
    Guest

    Re: How can I rename a module in VBA?

    In the VBA editor, select your module in the Project Explorer
    (CTLR+R to view), press F4 to display the properties window and
    change the name there.


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

    "CarolineHedges"
    <CarolineHedges.29ur7g_1151061617.0202@excelforum-nospam.com>
    wrote in message
    news:CarolineHedges.29ur7g_1151061617.0202@excelforum-nospam.com...
    >
    > I cant work out how to rename on of my sub modules?
    >
    > Does anyone know whether this is possible?
    >
    > thanks
    >
    >
    > --
    > CarolineHedges
    > ------------------------------------------------------------------------
    > CarolineHedges's Profile:
    > http://www.excelforum.com/member.php...o&userid=35705
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=554928
    >




  3. #3
    Harald Staff
    Guest

    Re: How can I rename a module in VBA?

    Hi Caroline

    Are you able to rename the others ? What is different ?

    Best wishes Harald

    "CarolineHedges"
    <CarolineHedges.29ur7g_1151061617.0202@excelforum-nospam.com> skrev i
    melding news:CarolineHedges.29ur7g_1151061617.0202@excelforum-nospam.com...
    >
    > I cant work out how to rename on of my sub modules?
    >
    > Does anyone know whether this is possible?
    >
    > thanks
    >
    >
    > --
    > CarolineHedges
    > ------------------------------------------------------------------------
    > CarolineHedges's Profile:

    http://www.excelforum.com/member.php...o&userid=35705
    > View this thread: http://www.excelforum.com/showthread...hreadid=554928
    >




  4. #4
    Gary''s Student
    Guest

    RE: How can I rename a module in VBA?

    Try:

    Sub Whats_In_A_Name()
    ThisWorkbook.VBProject.VBComponents("Module1").Name = "Caroline"
    End Sub
    --
    Gary's Student


    "CarolineHedges" wrote:

    >
    > I cant work out how to rename on of my sub modules?
    >
    > Does anyone know whether this is possible?
    >
    > thanks
    >
    >
    > --
    > CarolineHedges
    > ------------------------------------------------------------------------
    > CarolineHedges's Profile: http://www.excelforum.com/member.php...o&userid=35705
    > View this thread: http://www.excelforum.com/showthread...hreadid=554928
    >
    >


  5. #5
    Registered User
    Join Date
    06-23-2006
    Posts
    34

    Smile

    Thanks, it worked perfectly.

+ 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