Skip to content
Home ยป vba


VBA: fix “compile error: expected variable or procedure, not module”

I recently had to edit somebody’s VBA macro in Excel for a recurrent data cleaning task. The code was a mess because large chunks of it were created using Excel’s macro recorded. While structuring the code in subroutines and modules, I ran into an error. In this blog post I…