I need to run (a variant of) this module a few hundred times.
After a few times (2 to 5) I get an error "insufficient memory".
Anybody any idea how to fix this?
I have excel 2010 and installed office 64bits
After a few times (2 to 5) I get an error "insufficient memory".
Anybody any idea how to fix this?
Code:
Sub testertje()
Dim WBmodel As Workbook
Dim WSscan As Worksheet
Dim pad As String
pad = "G:\PM\1_16_Monitoren\05_Terugkerende_rapportering\22_Teamscan\winterversie\"
Workbooks.Open Filename:=pad & "modelteam.xlsm"
Set WBmodel = ActiveWorkbook
Set WSscan = WBmodel.Sheets("modelscan")
WSscan.Copy After:=Sheets(1)
Sheets("modelscan (2)").Name = "Boschmans"
WBmodel.SaveAs (pad & "vanuyts_desmet.xlsm")
WBmodel.Close savechanges:=False
Set WSscan = Nothing
Set WBmodel = Nothing
End Sub
I have excel 2010 and installed office 64bits