+ Reply to Thread
Results 1 to 3 of 3

Module.Name Naming error

  1. #1
    Registered User
    Join Date
    06-30-2011
    Location
    HK
    MS-Off Ver
    Excel 2003
    Posts
    6

    Module.Name Naming error

    When I rename the module name, like from module1 to a specif name for example "abc", it generates compile error: Expected variable or procedure, not module. Anyone can tell me why? Thanks for your help first!

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Module.Name Naming error

    Not sure why you are getting this error as I just tried it and no problem.

    Do you get this error when you name the module something else or just "abc"?

    Do you have any variable named "abc" in your project? Shouldn't make a difference, but thought I would ask.

    I good strategy for naming modules is to start them off with bas, so maybe you would have something like basABC
    HTH
    Regards, Jeff

  3. #3
    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: Module.Name Naming error

    Hello MingVBA,

    You will get this error if you try to assign "ABC" to module as below:
    Please Login or Register  to view this content.

    Here is macro to rename Module1 as "ABC"
    Please Login or Register  to view this content.
    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!)

+ 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