Hi, I have code that opens up a new temp workbook to which I add code (using John Walkenbach's method) to allow me to close the newly opened workbook without saving as follows:
When I close this workbook, the hourglass appears (in place of the pointer)& stays as long as the hourglass/pointer remains on the spreadsheet. When I move the hourglass/pointer off the screen, the hourglass goes away & I have the pointer again.
Does Excel think some process is still running? If so, why & how to I stop this?
Thanks!
Code:
Set VBCodeMod = ActiveWorkbook.VBProject.VBComponents("ThisWorkbook").CodeModule
With VBCodeMod
StartLine = .CountOfLines + 1
.InsertLines StartLine, _
"Private Sub Workbook_BeforeClose(Cancel As Boolean)" & Chr(13) & _
"activeworkbook.Close False" & Chr(13) & _
"End Sub"
When I close this workbook, the hourglass appears (in place of the pointer)& stays as long as the hourglass/pointer remains on the spreadsheet. When I move the hourglass/pointer off the screen, the hourglass goes away & I have the pointer again.
Does Excel think some process is still running? If so, why & how to I stop this?
Thanks!