Consulting

Results 1 to 3 of 3

Thread: Single workbook - Cannot run the macro... the macro may not be available in this work

  1. #1

    Single workbook - Cannot run the macro... the macro may not be available in this work

    Hi. I posted the question below on ExcelForum.com (here) on the 22nd and have gotten a number of views but no replies. It is an odd issue, so I'm posting here too in hopes of someone new seeing this and maybe chiming in on a possible cause and solution.

    When working in one of my workbooks and clicking any of my macro buttons, I've suddenly started to get the error message 'Cannot run the macro... the macro may not be available in this workbook.' I researched and found multiple suggestions, e.g., settings in the Trust Center, restarting, running Task Manager to see if another instance of Excel is running, and nothing works. More importantly, this is not at the application level, as it seems it is ONLY this one single workbook. I've tried multiple other workbooks and have no issues. Additionally, it seems to be an issue with this one workbook and only on my laptop. If I remote into another computer and open the workbook, all is fine. I've tried adding new buttons, new modules, new code, and everything returns this error. It just seems to be with clicking buttons - if I go into the VB editor, I am still able to work and step through macros. The main workbook is a macro-enabled template (.xltm). I get the same issue whether I'm editing the template or open a new workbook based on the template (as one would expect). I tried creating a new workbook and saving it as a .xltm file, added some code and a button, and had no issues. So it seems to be just with that one workbook.

    Any thoughts? Thanks.


  2. #2
    my thought is that there is corruption in the workbook, especially on the VBA.

  3. #3
    Hi. I just wanted to post back here with the root cause and solution. The button on the sheet points to a form, and there was something that was blocking the form from opening. I assigned a different macro to the button, which worked, and then I reassigned the form to the button, and it again worked. I'm not at all sure what the actual cause for this was. As I said in my original post, it only had the issue with this one workbook and only on my laptop. Strange. It's fixed though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •