#1
|
|||
|
|||
Empty Modules
I'm really a novice to Excel VBA, and I see a number of modules that appear to be empty in Project Explorer. I double-click on the modules and an empty page comes up.
But I don't know why they'd exist if they're really empty. If I delete them am I going to change something I shouldn't? Or are these macros I've deleted that left their shells behind, and so there's no problem deleting them? |
#2
|
||||
|
||||
If you no longer need the contents of a module you created, then you can use the Remove option in the Project window to delete the whole module, not just the code in it. It'll ask you whether you want to export the code to a text file, first, just as a precaution; you can make your own mind up about that.
And yeah, when you insert code modules, the VB Editor names them Macro1, Macro2 etc by default (you can change those names if you choose). The same when you record a macro; Excel puts each recorded macro in a module with a name like that. So if you're not using those modules any more, you can definitely delete them. As a general technique, when you're wondering whether you can safely delete something, you can always make a backup of the workbook, then delete the module(s and see what happens. But you're safe in this case. |
#3
|
|||
|
|||
Yeah, it seems that for whatever reason when you delete a macro you don't automatically delete the module. That seems weird, but if that's how it works that's how it works! Thanks for your help.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mirrored Files are Empty | sussertown | Office | 0 | 04-01-2013 08:21 AM |
Empty cells plotted as zero. | ColinC | Excel | 3 | 03-04-2013 04:57 AM |
Apparently empty (blank) cells aren't empty | daymaker | Excel | 3 | 03-08-2012 03:41 PM |
Empty rules | rene.kamphuis@ciz.nl | Mail Merge | 21 | 04-15-2011 12:34 AM |
Populate an empty .PAB file | imported_contiw | Outlook | 2 | 08-17-2006 08:50 PM |