Excel macro executing memorixed code; not including the edits I just added


Well-known Member
May 27, 2010
Wondering if anyone has ever experienced something where you've edited code and debugging over and over, discovering your edited code isn't included in the execution; instead, a previous interpretation of written code is being executed from memory (doesn't contain the alterations you've just made). It's really strange; when I 've witnessed this happening, I've tried inserting a msgbox at the beginning of the subroutine I'm trying to debug, just so I can see if I'm working on the right routine and have found that even adding a msgbox popup, isn't even firing when I execute the routine again; It's almost like the vbe editior hasn't detected my alterations to code and is running code from memory rather than recompiling what I've just edited. This doesn't happen frequently, but really annoying when it does. The work around is to just continue writing-fixing other procedures and eventually it refreshes what it's executing later on. Anybody else having this; any workarounds or ways to force vbe to re-compile what what I've written? office 365 business fully updated; have had this crop up at least 30x over 2years.


Well-known Member
Jul 2, 2014
I can only think this might happen for a file saved to the "cloud" like onedrive.
Or maybe you have two sessions or multiple versions of the VBA.... I've done that when moving a VBA bit to a Template, then edited the one in my Personal and not the Template version.

Forum statistics

Latest member
Joaquin Phoenix

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...