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

RAYLWARD102

Well-known Member
Joined
May 27, 2010
Messages
529
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.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
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.
 
Upvote 0

Forum statistics

Threads
1,214,521
Messages
6,120,018
Members
448,937
Latest member
BeerMan23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top