+ Reply to Thread
Results 1 to 3 of 3

adding new sub call creates problems

  1. #1
    Registered User
    Join Date
    11-26-2008
    Location
    New England
    MS-Off Ver
    2007
    Posts
    35

    adding new sub call creates problems

    I added a new sub to and now I'm getting a compile error.

    This was working fine until I added "Cust_Rev1". I get an compile error saying "expected variable or procedure, not module".

    Both are located in personal.xlsb. If I rem Cust_Rev1 out, I don't get a hiccup. (FWIW, I've been running "Cust_Rev1" on its own to debug it.)

    Main Program
    Please Login or Register  to view this content.

    And this is "Cust_Rev1". I threw the first 6 lines in for a quik test of the main program function .

    Please Login or Register  to view this content.
    Last edited by TedH; 01-28-2009 at 03:38 PM.

  2. #2
    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: adding new sub call creates problems

    Hello TedH,

    You have named your code modules the same as the procedures within them. Your module is named "Cust_Rev1" and the macro is named "Cust_Rev1". Either rename the module or the macro. An alternative is to call the macro this way...
    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!)

  3. #3
    Registered User
    Join Date
    11-26-2008
    Location
    New England
    MS-Off Ver
    2007
    Posts
    35

    Re: adding new sub call creates problems

    Thanks Leith. VBA makes me feel like a buffoon sometimes.

    Ted

+ 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