Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Answering Pop questions when macro is running

I have a macro which takes 15 min. to run. At various times while the macro
is running a popup box will appear and ask "A file named k:\abc.prn already
exits at this location. Do you want to replace it?" Yes No Cancel then
another one pops up "Do you want to save the changes......" Yes No Cancel. I
have 15 various pop ups which appear. My answers will always be the same for
each pop up but how do I automate it so it always answers the questions for
me and I don't have to sit and wait to answer each question as they pop up?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Answering Pop questions when macro is running

Put the following before the message box:

Application.DisplayAlerts = False

and after the message box:

Application.DisplayAlerts = True

This will choose the default answer for the message box, so make sure
you are setting the default button appropriately.

--JP


On Oct 5, 12:37*pm, mmiazga wrote:
I have a macro which takes 15 min. to run. *At various times while the macro
is running a popup box will appear and ask "A file named k:\abc.prn already
exits at this location. Do you want to replace it?" Yes No Cancel then
another one pops up "Do you want to save the changes......" Yes No Cancel.. *I
have 15 various pop ups which appear. *My answers will always be the same for
each pop up but how do I automate it so it always answers the questions for
me and I don't have to sit and wait to answer each question as they pop up?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Answering Pop questions when macro is running

YOu need to add an opion it the macro at the beginning to use default values
or wait for respnse. Then modify the maco to handle the two options. YO
could make an array of answers so you can easily change the options or even
get the responses from a file. But the code would have to be modified.
there is no easy way of feeding the response automatically into the boxes.

"mmiazga" wrote:

I have a macro which takes 15 min. to run. At various times while the macro
is running a popup box will appear and ask "A file named k:\abc.prn already
exits at this location. Do you want to replace it?" Yes No Cancel then
another one pops up "Do you want to save the changes......" Yes No Cancel. I
have 15 various pop ups which appear. My answers will always be the same for
each pop up but how do I automate it so it always answers the questions for
me and I don't have to sit and wait to answer each question as they pop up?

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
Answering an Excel generated msg box Yes Darin Kramer Excel Programming 2 August 9th 07 10:36 AM
Answering Message boxes isbjornen Excel Programming 13 October 26th 06 08:16 PM
Answering pop-up question Matt Excel Programming 7 October 24th 06 08:49 PM
Answering a question in a cell Salesmaster Excel Worksheet Functions 2 July 16th 05 10:33 PM
Answering InpBox prompt lashio Excel Discussion (Misc queries) 4 June 24th 05 02:25 AM


All times are GMT +1. The time now is 02:36 AM.

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

About Us

"It's about Microsoft Excel"