Hi I got Excell 2000
I have a piece of code which opens a workbook(a) and copys selected sheets to Workbook(B). I then close workbook (A) but do not want the "do you want to save..." display to pop up so I wrote the following code to stop it from displaying the save option.
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
If i step through my code as soon as I get to the close bit and move my mouse over application.dis its telling me that it is true. which of coarse make the save option pop up. so I wrote this code in case I turned the displayalerts off some where else.
If Application.DisplayAlerts = True Then Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
when I step through it picks it up as being true and does the then bit and then carrys on as it still being true. it seems to be ignoring the fact that I had made it false.
I know this works as I have other workbooks that do a similar thing.
Any Ideas?
Bookmarks