79283173

Date: 2024-12-15 20:56:50
Score: 2
Natty:
Report link

This can happen if the objects aren't fully released from memory. After deleting the sheet, explicitly set the sheet object to Nothing to release it from memory:

Dim ws As Worksheet
Set ws = ActiveWorkbook.Sheets("Output_Final")
ws.Delete
Set ws = Nothing

See also Remove a non-existant Sheet in VBA, VBA code deletes it's own sheet, leaving a "ghost" sheet behind, GHOST Worksheet in Project Explorer - How to Delete It?

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: Michal