Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default What do you do when DisplayAlert does not work in VBA?

I have an Excel workbook that is created using VBA. I have set DisplayAlert
to False just before I save the Workbook. This does not seem to work as, the
Save Dialog Box keeps coming up. I do not want this because I want to
automate the whole process. Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default What do you do when DisplayAlert does not work in VBA?

Hi M. Hussaini

If you want to close the file after you save with VBA and not want to see Save Dialog Box
Then you can use this with code

ActiveWorkbook.Close False

If you have set a reference (WB ) to the file you can de
WB.Close False


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"M. Hussaini" wrote in message ...
I have an Excel workbook that is created using VBA. I have set DisplayAlert
to False just before I save the Workbook. This does not seem to work as, the
Save Dialog Box keeps coming up. I do not want this because I want to
automate the whole process. Any suggestions?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default What do you do when DisplayAlert does not work in VBA?

Are you using this line? Application.DisplayAlerts = False

DisplayAlerts by itself does nothing.

You can also use this method with no message.

ActiveWorkbook.Close SaveChanges:=True


Gord Dibben MS Excel MVP

On Thu, 1 Feb 2007 14:08:01 -0800, M. Hussaini
wrote:

I have an Excel workbook that is created using VBA. I have set DisplayAlert
to False just before I save the Workbook. This does not seem to work as, the
Save Dialog Box keeps coming up. I do not want this because I want to
automate the whole process. Any suggestions?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default What do you do when DisplayAlert does not work in VBA?

The first time you save the workbook, it needs a path and filename. Use
SaveAs instead of Save, and provide a full name. This should avoid the Save
As dialog popping up.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"M. Hussaini" wrote in message
...
I have an Excel workbook that is created using VBA. I have set DisplayAlert
to False just before I save the Workbook. This does not seem to work as,
the
Save Dialog Box keeps coming up. I do not want this because I want to
automate the whole process. Any suggestions?



Reply
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protecting Work from being copied albertmb Excel Discussion (Misc queries) 4 February 6th 07 05:42 PM
Counting dates in multiple work sheets and work books Savage Excel Discussion (Misc queries) 0 December 19th 05 11:41 PM
Moving a sheet from one work book to another? WTG Excel Worksheet Functions 1 November 3rd 05 07:12 PM
My links no longer work . . . mike Excel Discussion (Misc queries) 8 October 27th 05 11:59 PM
How to copy the work sheets from different workbooks into one? Sesh Excel Discussion (Misc queries) 1 April 15th 05 06:03 PM


All times are GMT +1. The time now is 08:57 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"