What I found is that those spreadsheet which had a Workbook_Open method (even if it appeared empty) switched the DisplayAlert setting. When I deleted the method, the setting stayed FALSE when the spreadsheet was opened.
There was also a
Worksheet_SelectionChange
method which appeared empty. I don't know if that would cause the same behavior, but is there any reason not to delete any macro which is empty?
>Look for macros
>
>>In looking at the VBA editor I found
>>Private Sub Workbook_Open()
>>
>>End Sub
>>
>>Is there any other place to look?
>>
>>
>>>Check if it has VBA code that runs on spreadsheet open.
>>>
>>>
>>>>
>>>>We have been using Excel automation for quite some time but I've run into something I haven't seen before. Creating an instance of Excel is always done via
>>>>oxl = CREATEOBJECT("excel.application")
>>>>oxl.displayalerts = .F.
>>>>
>>>>In our current situation we are processing a series of spreadsheets in a folder. When I open a particular spreadsheet DISPLAYALERTS suddenly switches to .T.
>>>>
>>>>It happens every time I open this particular spreadsheet.
>>>>
>>>>Is there anything I can check in the spreadsheet to see what is causing the setting to change?
>>>>
>>>>Thanks to all.............Rich