'Creating endless copies of objects

I have a macro which theoretically works perfectly but I think it is creating unnecessary processing and calculation requirements which then crashes the file. It's in a file which I use regularly so maybe the problem is getting worse over time as well- hard to say. In the VBA Project window under Microsoft Excel Objects I have endless copies of all objects referenced which seem to have been created automatically ie

Sheet11
Sheet111
Sheet1111

ThisWorkbook
ThisWorkbook1
ThisWorkbook10
ThisWorkbook11
etc...

Does anyone know why this is/if it's an issue? If it's an issue how do I get rid of it?

The other related question I have is that I've been using the following macro to access data in a workbook without fully opening it, but I'm concerned that the wb.close command doesn't work when the workbook is open as a background process ie I suspect that maybe the workbook stays open in the background, slowing things down. Below is an example of the code which does this:

Dim xlApp As Application

Set xlApp = GetObject("X:\Power\UK\GA\doc.xlsx")
Set wbcheck = xlApp.Workbooks("doc.xlsx")

'Do stuff!!

wbcheck.Close False

Apologies that this is a fairly general question but essentially I want to write cleaner code that won't make my spreadsheet crash!

Thanks

Rachel



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source