+ Reply to Thread
Results 1 to 8 of 8

worksheet doesn't recognize module when I rename it

  1. #1
    Registered User
    Join Date
    06-14-2013
    Location
    Atlanta
    MS-Off Ver
    Excel 2007
    Posts
    3

    Unhappy worksheet doesn't recognize module when I rename it

    Can anyone help? When I rename my VBA module my worksheet will not recognize my UDF. Works fine when I change it back to "Module1".

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: worksheet doesn't recognize module when I rename it

    Hi and welcome to the forum,

    I just did what you suggest and find my UDF still works, even after renaming Module1 to MyModule.

    Let's try some other answers. Did you recompile your code after changing the name? Do you have Calculations set to Auto or do you recalculate? Do you need a Application.Volatile in your UDF so it recalculates? Did you put your cursor in the cell the UDF was in and press enter?

    I just don't find the problem with my example.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    06-14-2013
    Location
    Atlanta
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: worksheet doesn't recognize module when I rename it

    Hi MarvinP,
    I am just a beginner in working with UDF. I tried changing the name and recompiling, ensured auto calculations set, added application.Volatile, and I do put my cursor in the cell to restart call sequence. Still no help. Something I didn't mention was that the name change works until I close my worksheet and reopen it again (I should have put this in my original post. sorry).

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644
    What did you rename the module to?
    If posting code please use code tags, see here.

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: worksheet doesn't recognize module when I rename it

    Hey Norie,

    This is what I think s/he meant by renaming the module: http://answers.microsoft.com/en-us/o...c-68b599b31bf5

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: worksheet doesn't recognize module when I rename it

    Marvin

    I was asking what the OP has renamed the module to.

  7. #7
    Registered User
    Join Date
    06-14-2013
    Location
    Atlanta
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: worksheet doesn't recognize module when I rename it

    in VB I selected the module and changed the name in properties. I saw Norie's Question about what I named the module to and it started me thinking. I was naming the module the same as my function. I renamed the module with a variant of my UDF so I would know what it was. It seems to be working fine now. Again, I am just beginning. Thanks all for the help!

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: worksheet doesn't recognize module when I rename it

    That's what I thought you might have been doing.

    Nothing wrong with renaming module, but be careful with what you use for the name.

+ 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