+ Reply to Thread
Results 1 to 3 of 3

Help: Excel Macro window run button disabled for all code in 1 module?

  1. #1
    keeena
    Guest

    Help: Excel Macro window run button disabled for all code in 1 module?

    This is an odd one and I can't figure it out. Using Excel 2K3 SP2 on
    W2K. Excel macro security level medium. Choose "Enable" to security
    prompt when opening WB. 3 modules and a bunch of class modules.
    Compiles fine, all code runs fine and has been in use for some time.

    In Excel, select Tools -> Macro -> Macros... In this window, all
    appropriate routines are displayed from the 3 modules. However, the
    Macros window will disable all buttons except Cancel and Edit if I
    highlight any routine from one of these modules. I cannot select Run.
    At some point in the past this had been working.

    Things I tried:
    1. Explicitly declare Subs as "Public" - no change

    2. Rename the problem Module - no change

    3. Move all code (cut/paste) to a new Module - no change

    4. Checked the .BAS file w/ a text editor to see if there were some
    hidden attributes - nothing

    5. Copy all code to a new Module - when I do this, then the Macros
    window will display 2 entries for each routine (e.g. Module1.xyz and
    Module2.xyz). Whats weird now is that the Run button is enabled for
    BOTH of these now in the Macros window. If I then delete one of these
    modules, it becomes disabled again.

    There are no duplicate routine names or conflicts that I can see. I
    can run the code directly from the VBA IDE and it runs fine. I do use
    the Explicit option. I have conditional compilation constants, but not
    used in this particular module. No code runs automatically on startup.
    No add-ins installed.

    Can someone help me out? Is there anything else I can check? I'm
    hoping someone has an answer. Thanks!!


  2. #2
    keeena
    Guest

    Re: Help: Excel Macro window run button disabled for all code in 1 module?

    Well, I found the culprit - Name Manager Add-In Beta 4 version build
    560.

    The end result is that some routines can become corrupted? to some
    extent (exact root cause is unknown to me...looks like it might be a
    renaming or naming issue); it will cause the Excel application to
    disable the Run / Step Into / Edit / Delete / Options buttons in the
    Run Macro window. The code still compiles fine and can be run through
    the VBA IDE.

    This does not necessarily apply to all routines in a Module.

    If you remove the Add-In, everything becomes normal.

    I am submitting an issue request w/ the author.


  3. #3
    keeena
    Guest

    Re: Help: Excel Macro window run button disabled for all code in 1 module?

    I spoke with the author of NM. The issue has been identified as an
    Excel naming conflict which I was unaware of. Naming routines R_xyz
    (with the underscore being any numeral) will cause this problem - I
    guess it conflicts with the R1C1 name.

    Never really occured to me since this naming will work for variable
    names.


+ 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