Can the code in an excel vba module become corrupted?


In Excel 2010. Can an ordinary module (not userform, class) become corrupted somehow? I can open my project, even run code, but for one particular module, can't edit, can't even delete it without Excel crashing. ?It's just code, isn't it?

Specific question: Is this a known problem with a known cause and/or solution? While I find plenty of info about corrupted worksheets etc. on the web, I don't find much about this situation. Is there somewhere I can look? Is there a remedy?


I'd recommend the VBA Code Cleaner from AppsPro. What the CodeCleaner does is export all the modules to a folder and then re-export. So actually, if for some reason you cannot install Code Cleaner (because of corporate policy or something) then you can do this manually by right clicking on the module and take the relevant menu item.

<a href="http://www.appspro.com/Utilities/CodeCleaner.htm" rel="nofollow">http://www.appspro.com/Utilities/CodeCleaner.htm</a>


  • The GitHub.app for Mac crashes every time, if a local repository is loaded
  • Facebook iPhone SDK, App crashed in pre iOS 4.2, But works fine in iOS 4.2+
  • Memory allocation profilers for managed and unmanaged code?
  • Unable to delete a worksheet using EPPlus
  • Copy and Paste Entire Row
  • Removing levels from data frame read from CSV file - R
  • Using VBA to select a dynamic range of cells and create a chart
  • iPhone - UIWebView multiple locks
  • MVC3 Razor - ListBox pre-select not working
  • Reading JSON from a file using C++ REST SDK (Casablanca)
  • Ajax Loaded meta Tags
  • Xamarin Forms - UWP Fonts
  • Adding a button at the bottom of a table view
  • FB SDK and cURL: Unknown SSL protocol error in connection to graph.facebook.com:443
  • Spring security and special characters
  • Getting last autonumber in access
  • JavaScriptCore crash on iOS9
  • Excel - Autoshape get it's name from cell (value)
  • Check if a string to interpolate provides expected placeholders
  • Join two tables and save into third-sql
  • Arrow is showed instead of the material design version hamburger icon. Why doesn't syncState in
  • How to model a transition system with SPIN
  • ORA-29908: missing primary invocation for ancillary operator
  • Delete MySQLi record without showing the id in the URL
  • GridView Sorting works once only
  • SVN: Merging two branches together
  • RestKit - RKRequestDelegate does not exist
  • Arrays break string types in Julia
  • Is there a mandatory requirement to switch app.yaml?
  • Traverse Array and Display in markup
  • Transpose CSV data with awk (pivot transformation)
  • Matrix multiplication with MKL
  • CSS Applying specific rule for a specific monitor resolution with only CSS is posible?
  • What are the advantages and disadvantages of reading an entire file into a single String as opposed
  • How can I remove ASP.NET Designer.cs files?
  • python draw pie shapes with colour filled
  • Is there any way to bind data to data.frame by some index?
  • How can i traverse a binary tree from right to left in java?
  • UserPrincipal.Current returns apppool on IIS
  • Converting MP3 duration time