LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Possible bug?


Hi I got Excell 2000

I have a piece of code which opens a workbook(a) and copys selecte
sheets to Workbook(B). I then close workbook (A) but do not want th
"do you want to save..." display to pop up so I wrote the followin
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 m
mouse over application.dis its telling me that it is true. which o
coarse make the save option pop up. so I wrote this code in case
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 bi
and then carrys on as it still being true. it seems to be ignoring th
fact that I had made it false.

I know this works as I have other workbooks that do a similar thing.

Any Ideas

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=51780

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"