Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Within a macro routine I am creating a .prn file and saving over an exisiting
file. Every morning this macro runs and a prompt appears asking if I am sure I want to overwrite the existing file. The user must click "Ok" in order for the routine to continue. Is there some syntax in which the macro will automatically answer the msg box? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this:
insert: Applictaion.DisplayAlerts = false at the star of your code then Application.DisplayAlerts = true just before the end sub statement Mike -----Original Message----- Within a macro routine I am creating a .prn file and saving over an exisiting file. Every morning this macro runs and a prompt appears asking if I am sure I want to overwrite the existing file. The user must click "Ok" in order for the routine to continue. Is there some syntax in which the macro will automatically answer the msg box? . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try:
Application.DisplayAlerts = False ' ' your code ' Application.DisplayAlerts = True Regards Trevor "Daniel75" wrote in message ... Within a macro routine I am creating a .prn file and saving over an exisiting file. Every morning this macro runs and a prompt appears asking if I am sure I want to overwrite the existing file. The user must click "Ok" in order for the routine to continue. Is there some syntax in which the macro will automatically answer the msg box? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
MikeW and Trevor Shuttle, you both answered the question wonderfully.
Thanks, you saved 5 keystrokes performed every morning! "Daniel75" wrote: Within a macro routine I am creating a .prn file and saving over an exisiting file. Every morning this macro runs and a prompt appears asking if I am sure I want to overwrite the existing file. The user must click "Ok" in order for the routine to continue. Is there some syntax in which the macro will automatically answer the msg box? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can I stop the EULA message appearing every time I start Excel? | Excel Discussion (Misc queries) | |||
toolbar automatically appearing | Excel Discussion (Misc queries) | |||
Error Message Appearing | Excel Discussion (Misc queries) | |||
Error Message appearing when saving a file | Excel Discussion (Misc queries) | |||
macro to respond to clipboard prompt? | Excel Programming |