Forum Discussion
Excel runs a VBA macro every time I modify a cell
I'm having an issue with Office 365 for Enterprise in which any time I modify a cell in Excel, one of my VBA macros is called, and calls out an error because the worksheet I'm working with doesn't contain the dataset the particular macro requires to do its thing. It's really frustrating.
I type data into a cell, doesn't matter if it's numbers or a word, and immediately when I press Enter or an arrow key to move to another cell, the VBA editor pops up, says "Compile error: Can't find project or library" I click OK and it prompts me to enter the password for this macro, which I don't have. I have tried hitting the stop (Reset) button, but still, when I go put data into the next cell, it happens again, literally every time I put data into a cell.
I've also tried doing a 'quick repair' of Office, which had no effect.
Any thoughts on how to stop this ridiculous behavior?
- NikolinoDEGold Contributor
Without a file or the VBA code to generate or look for the error, it is not possible to provide a reasonable solution.
If the macro requires a password and you don't have it, it might indicate that you don't have full access to modify or disable the problematic macro. If you can’t access the macro:
Check with the author of the macro or your IT department to obtain the password or have the macro modified.
Create a copy of the workbook and remove all macros from the copy (use File > Save As, and save as an .xlsx file instead of a macro-enabled .xlsm file) to work without triggering the macro.
Otherwise it would be beneficial to add a little more information, as described above.
Thank you for your understanding