I have a workbook in which I consolidate data from various CSV files. There are a number of macros in this file including ones to add new sheets to the file, which is on a shortcut key Ctrl+Shift+N. This has been working perfectly for many years. This morning the shortcut key does absolutely nothing. If I go to the Excel developer tab and click on the Macros button, the list of macros is empty. However, if I open VBA I can run the macro from there and it still works perfectly.
I run Office Professional Plus 2019 and it ran an update yesterday. Does anyone know of a new setting introduced that may hide the macros in Excel itself. Note that macros are enabled on this workbook.
Just for closure should someone else stumble across this. The problem was related to the specific file. It somehow got "partially" corrupted. Still worked and could fire macros from VBA IDE as well as linked buttons, just not with shortcut keys as macros not "visible" in Excel view. File degraded further to a point where it could no longer save.
Related
I have some macros attached to buttons in the Quick Access Ribbon. All but one of the buttons have been functioning normally, so I'm not sure when this started.
I tried to use a less-used macro button this morning called Unhide All Sheets and it threw this error:
Cannot run the macro 'PERSONAL.XLSB!UnhideAllSheets.UnhideAllSheets'. The macro may not be available in this workbook or all macros may be deleted."
So I went to review my code and all my macros are invisible from the front-end. I select Developer -> Macros, the list is completely empty, and when I attempt to create new buttons on the Quick Access Toolbar, the macro list there is also completely empty.
When I hit Alt + F11 to open the VBA editor, I can see and update macros in specific workbooks and in my personal workbook. Most of them still run, although the offending macro (UnhideAllSheets) throws an Unexpected Error (35005) when run from the editor.
Anybody ever seen this before? I've been googling for an hour with no results.
Most Macro Buttons still work
Nothing on the Macro List
Customize Ribbon can't see the macros
Still visible and functioning in VBA Editor (except for "UnhideAllSheets")
I have same issue and I manually checked/marked atpvbaen in the tools>references. This has solved my problem !
I was facing a similar issue, where some buttons were working and some weren't. What I noticed was my module's name was similar to my procedure's (macro's) name. I'm not aware of the reason, but I when ensured procedures names' are different than the module names.
In Excel, when opening the list of macros, there are some invalid entries. How to get rid of them?
Background:
I have an extended VBA library, containing a lot of UDFs and subs. I have added descriptions for UDFs using macro options. Maybe i created these invalid entries accidently in the past by a sub, which parses my code modules and generates descriptions for UDFs if this is provided via comments in the code module. This works fine now.
The invalid entries are actually the names of UDFs which do not exist anymore. They should not have appeared unter macros at any time, but again, maybe I messed up in the past.
I also would like to add some description to macros that do exist - but apparently that is only possible for UDFs?
Clarifications:
There is only this one workbook open. These are not macros of a different workbook. I selected "This Workbook only" for list of macros anyway.
There are no addins.
In VBE under Macros these invalid entires do NOT appear.
In Excel, under Developer Tools->Macros they DO appear.
In Excel, under Developer Tools->Macros, I can not edit or delete or execute these entries. Delete is greyed out, edit and execute lead to a popup error saying: "Der Bezug ist ungültig."
If you are referring to the Macro dialog that opens when clicking View > Macros, then note that there is a drop-down with which you can filter to show macros from a particular workbook only.
Use this to find where the "invalid" macros live, then edit that workbook and handle the macros from there (fix them or remove them).
The Macro dialog box that opens from the Developer tab lists all macros in "All open workbooks" by default. In the dropdown that shows this selection you can select to show macros in only a specific workbook. The reverse of this coin is that you can know exactly where any listed macro is located.
There are buttons to the right of the list which allow you to Edit or Delete any of the listed macros. The Edit button will take you to the module where the macro is stored.
There is also an Options button. When you click that another dialog box opens where you can set shortcuts as well as add a description. You can add a description to any listed macro, whether it's used as UDF or otherwise.
I wonder what would happen if a description exists for a macro that has been deleted. If such a situation is supported by Excel pressing the Delete button should rectify it.
I found an answer on microsoft.com:
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_winother-mso_2016/cannot-delete-macros/8e9072ae-ad95-49cb-952c-3a50b746d0d2
So it appears my workbook got somehow "corrupted". As I said, I did play with it quite a bit during development. So what I did to fix it:
Export all code modules.
Save workbook as .xlsx under a different name.
Open this cleaned xlsx and save it as xlsm again.
Imported all code modules into this cleaned xlsm.
Manually copied code in worksheet from corrupted version to clean version.
Now the macros are gone in the cleaned version.
My Excel file had a load of macros and now when I click Developer - Macros, they don't show up in the list, the list is empty. How do I fix?
Hi this has 100% worked for me in all situations, if it is a macro file (in my case at least).
Open the file in protected mode (usually I save it on the share network so it prompts me to "Enable Content"). You must make sure you're in protected mode so no macros/libraries are activated.
DON'T ENABLE CONTENT
Go to Developer, Visual Basic, then click on "Debug" and click on "Compile VBA Project".
Save the file -- > Close - - > Reopen.
I have seen this happen multiple times, and eventually found a fairly easy solution.
To first summarize the problem, we have an excel workbook with macros. After saving and latter reopening the workbook, the macros are no longer there. Even selecting alt F11 ,fails to show any macros, even though macros are enabled in trust center.
The solution which has worked for me each time is to simply do the following.
Copy the Excel file to a thumb drive, and then open on a different computer. When the file opens, you will see an option at the top of the worksheet to Enable Functions. Click yes. At this point you can click alt F11 to verify that your macros are there. Assuming they are (this has worked for me every time), simply save the file, and then save back to your original location. When you open the workbook yur macros will be visible.
Good luck, and keep Excelling.
An even easier solution that has also worked for me 100% of the time is to open the file normally, and instead of clicking “enable content,” use shortcut alt f11 to open the VBA window. You should see your macros, save the file and reopen and “enable content” should work fine.
Surprisingly easy way to get it back.
Without the file open, right click on it.
Click on RESTORE PREVIOUS VERSIONS
It'll give you a list of previous days copies. Just try opening one of the ones from a previous day that the macro worked. The missing macro appeared in one of those for me when I opened it.
I had this same issue, but I was not able to open the modules in the VBA editor. I solved it by emailing a copy to myself, then opening it from outlook (with macros disabled). Then I compiled the VBA and saved it. The macros are back :)
I am developing an excel "application" that will be distributed to a few users, so it has a lot of macros/vba code on it. The workbook is about 2MB right now, so it's not incredibly big.
I was developing it on excel 2013, however my workstation had a problem and I had to work on it from a computer with excel 2010 for about a week. Problem is, when I came back to excel 2013, whenever I try to save the workbook(on excel 2013) it immediatly stops responding. When the program closes, excel is never able to recover anything and says the file is corrupted. The problem simply does not occur on excel 2010, where everything works perfecly and I can save it OK.
Does anyone have any idea what might be causing this? I have tried removing a few sheets and saving the workbook afterwards, to test if a specific sheet was corrupted/causing problems, but even after I remove all the sheets from my woorkbook (and just leave a new blank sheet on it) it still freezes when I try saving.
It's important to note that the workbook in question uses a lot of excel features, meaning it has conditional formatting, defined names, activeX controls, shapes, formulas etc.
Well, I did what Ralph suggested and created a new excel file, then copied everything from the old workbook to the new one. Now it works fine. Apparently that was my only way out, the file was probably corrupted in some way.
I'm having the following issue: I've an Excel spreadsheet with a lot of VBA codes and ActiveX controls, including RExcel formulas.
The Excel version is 2007.
When I try to open this file, Task Manager says Excel isn't answering and something starts like if Excel started running endless codes; I deactivated each control and it still seems broken.
I would like to recover at least some formulas I've written in that spreadsheet, but this is actually impossible by opening the spreadsheet in conventional way.
Could you tell me how I can "read" formulas and text in that spreadsheet without opening it by Excel?
Thanks,
Indeed have calculation set to manual for a start.
Now set your security settings such that macros and activeX are disabled:
Excel Options > Trust Center > Trust Center Settings... > Macro Settings > Disable all macros with notification
For ActiveX I am not sure if there is a menu in excel-2007 like for macros, but if there is make sure it is set to not run as well.
Now you can open your excel workbook and it will not run your macro's and shouldn't auto calculate or update!
ADDED: I have had something like this in the past and this is what worked in 1 occasion: install an other office excel application, like open office (the calc application has the excel functionality) and see if it opens in that application. Then if it does, save the file (under another file name) and close it. Open the new file under MS Office Excel, and see what is still recoverable.
Good luck!
use a tool like 7zip to extract the files. the sheets/formulas are in the .xml
the code in a macro enabled spreadsheet is in a .bin file
this can be read with MalOfficeScanner