Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Selecting a response on a dialogue box from a Macro

What is the code to select a response on a dialogue box?

I have a Macro which saves the open work book to a couple of locations
- in one of the locations it needs to be saved with the same file name
each time.

Obviously each time the macro runs, Excel opens a dialogue box asking

"Are you sure you want to Save? - this file already exists"

What code can I use to select the Yes button from the Macro?

Cheers,

Steve

  #2   Report Post  
Posted to microsoft.public.excel.misc
RCW RCW is offline
external usenet poster
 
Posts: 9
Default Selecting a response on a dialogue box from a Macro

Try this.
Near the top of your macro, add the line:
Application.DisplayAlerts = False

then near the end of the macro, add the line:
Application.DisplayAlerts = True

"ChemicalJasper" wrote:

What is the code to select a response on a dialogue box?

I have a Macro which saves the open work book to a couple of locations
- in one of the locations it needs to be saved with the same file name
each time.

Obviously each time the macro runs, Excel opens a dialogue box asking

"Are you sure you want to Save? - this file already exists"

What code can I use to select the Yes button from the Macro?

Cheers,

Steve


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Selecting a response on a dialogue box from a Macro

Spot on! - Thanks very much!


RCW wrote:
Try this.
Near the top of your macro, add the line:
Application.DisplayAlerts = False

then near the end of the macro, add the line:
Application.DisplayAlerts = True

"ChemicalJasper" wrote:

What is the code to select a response on a dialogue box?

I have a Macro which saves the open work book to a couple of locations
- in one of the locations it needs to be saved with the same file name
each time.

Obviously each time the macro runs, Excel opens a dialogue box asking

"Are you sure you want to Save? - this file already exists"

What code can I use to select the Yes button from the Macro?

Cheers,

Steve



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
Macro Help (Uppercase multiple ranges?) Ken Excel Discussion (Misc queries) 14 December 2nd 06 07:23 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Macro Help In Excel welshlad Excel Discussion (Misc queries) 14 October 26th 05 02:34 PM
macro that brings user to cell based on "yes/no" response lennyx2 Excel Discussion (Misc queries) 2 February 9th 05 02:47 PM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM


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