+ Reply to Thread
Results 1 to 4 of 4

Module error?

  1. #1
    Steve C
    Guest

    Module error?

    Can someone explain why two subprocedures in the same module are listed
    differently in the Macros dialog box? The procedures are called Test1 and
    Test2. When I choose Tools > Macro > Macros, the first displays as Test1,
    but the second displays as Module1.Test2.

    It seems that Test2 runs correctly, but it also frequently causes one of
    those "Send Error" messages and shuts down Excel. Is the way these are
    listed telling me that there's something potentially wrong with my code?
    --
    Steve C

  2. #2
    Tom Ogilvy
    Guest

    RE: Module error?

    You apparently have another module in your workbook which also has a sub
    procedure named Test2. The dialog only displays the minimum amount of
    information to discriminate the procedure uniquely from the context of the
    activeworkbook.

    --
    Regards,
    Tom Ogilvy


    "Steve C" wrote:

    > Can someone explain why two subprocedures in the same module are listed
    > differently in the Macros dialog box? The procedures are called Test1 and
    > Test2. When I choose Tools > Macro > Macros, the first displays as Test1,
    > but the second displays as Module1.Test2.
    >
    > It seems that Test2 runs correctly, but it also frequently causes one of
    > those "Send Error" messages and shuts down Excel. Is the way these are
    > listed telling me that there's something potentially wrong with my code?
    > --
    > Steve C


  3. #3
    Norman Jones
    Guest

    Re: Module error?

    Hi Steve,

    Do you have a macro named Test2 in another module?


    ---
    Regards,
    Norman



    "Steve C" <[email protected]> wrote in message
    news:[email protected]...
    > Can someone explain why two subprocedures in the same module are listed
    > differently in the Macros dialog box? The procedures are called Test1 and
    > Test2. When I choose Tools > Macro > Macros, the first displays as Test1,
    > but the second displays as Module1.Test2.
    >
    > It seems that Test2 runs correctly, but it also frequently causes one of
    > those "Send Error" messages and shuts down Excel. Is the way these are
    > listed telling me that there's something potentially wrong with my code?
    > --
    > Steve C




  4. #4
    Steve C
    Guest

    RE: Module error?

    I discovered that I had referenced a named range with the same name, Test2,
    as my sub procedure. When I renamed the subprocedure, it displayed properly.
    Thanks for steering me in the right direction.
    --
    Steve C


    "Tom Ogilvy" wrote:

    > You apparently have another module in your workbook which also has a sub
    > procedure named Test2. The dialog only displays the minimum amount of
    > information to discriminate the procedure uniquely from the context of the
    > activeworkbook.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Steve C" wrote:
    >
    > > Can someone explain why two subprocedures in the same module are listed
    > > differently in the Macros dialog box? The procedures are called Test1 and
    > > Test2. When I choose Tools > Macro > Macros, the first displays as Test1,
    > > but the second displays as Module1.Test2.
    > >
    > > It seems that Test2 runs correctly, but it also frequently causes one of
    > > those "Send Error" messages and shuts down Excel. Is the way these are
    > > listed telling me that there's something potentially wrong with my code?
    > > --
    > > Steve C


+ 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