phrankndonna
12-26-2021, 05:44 AM
Hi. I posted the question below on ExcelForum.com (here (https://www.excelforum.com/excel-programming-vba-macros/1366762-single-workbook-cannot-run-the-macro-the-macro-may-not-be-available-in-this-workbook.html#post5610411)) 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.
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.