Forum Discussion

jhammons's avatar
jhammons
Copper Contributor
Apr 03, 2025
Solved

Remove "Ghost" Excel sheet object from VBA

Hello,   I am unable to remove these "Ghost" excel objects left behind after deleting the sheet.   I have tried multiple methods that I found on the internet to remove these objects, but nothing w...
  • jhammons's avatar
    jhammons
    Apr 03, 2025

    After trying many methods that did not work from CoPilot and other AI engines, the easiest method was to export all the modules, userforms, and sheets to remove these "Ghost objects".  There appears to be a more time consuming and complicated method to manually edit the binary code directly in the VBA project structure. 

    It appears that it is not "corrupt" per se but some how the codename (CAD2) is somewhere in the project structure.  

    I was successful exporting all the modules, userforms and sheets and then transferred all to a new Excel file to save.  The ghost files are gone.  Not everything transfers.  I had some "buttons" that referenced macros that looked for the previous version name, so you have to be careful to name the project the same name or edit those buttons references macros. 

Resources