D
droopy928gt
I've got a very strange problem for which I can't find an explanation.
The application I made quits excel using application.quit. Befor
doing this I check if the workbook was saved and if not save it.
Code
-------------------
'Check if the workbook was saved
If Workbooks(ThisWorkbook.Name).Saved = False Then
'Save this workbook
Workbooks(ThisWorkbook.Name).Save
End If
'Close excel
Application.Qui
-------------------
Using above code I would think that the application would quit withou
asking for it to be saved. Well, it doesn't. Only when I add th
application.displayalerts = false statement will it do so. Afterward
when checking I can't find any differences between a saved and no
saved workbook though. Apart from that, when quiting the applicatio
there's only 1 workbook open.
It becomes weirder when you know that this problem only occurs afte
having done something using the application. The application itself i
basically a database which displays data in textboxes depending upo
certain criteria. It has 2 worksheets being 1 for the data used itsel
and 1 which contains temp data used in the application. Both sheet
though are saved when using the workbooks().save statement.
Could any of you offer an explanation of this strange behavior or migh
have experienced similar before? Is this maybe some sort of bug lik
the usedrange problem?
I use the workaround of setting displayalerts to off now but I woul
really like to know why this happens.
Thanks and best regards,
Leo
The application I made quits excel using application.quit. Befor
doing this I check if the workbook was saved and if not save it.
Code
-------------------
'Check if the workbook was saved
If Workbooks(ThisWorkbook.Name).Saved = False Then
'Save this workbook
Workbooks(ThisWorkbook.Name).Save
End If
'Close excel
Application.Qui
-------------------
Using above code I would think that the application would quit withou
asking for it to be saved. Well, it doesn't. Only when I add th
application.displayalerts = false statement will it do so. Afterward
when checking I can't find any differences between a saved and no
saved workbook though. Apart from that, when quiting the applicatio
there's only 1 workbook open.
It becomes weirder when you know that this problem only occurs afte
having done something using the application. The application itself i
basically a database which displays data in textboxes depending upo
certain criteria. It has 2 worksheets being 1 for the data used itsel
and 1 which contains temp data used in the application. Both sheet
though are saved when using the workbooks().save statement.
Could any of you offer an explanation of this strange behavior or migh
have experienced similar before? Is this maybe some sort of bug lik
the usedrange problem?
I use the workaround of setting displayalerts to off now but I woul
really like to know why this happens.
Thanks and best regards,
Leo