• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Why application.DisplayAlerts = False is not working

ThrottleWorks

Excel Ninja
Hi,


I am using application.DisplayAlerts = False


But despite of this line macro is displaying alerts.


Can anyone please tell me why this is happening, & how can I resolve this.
 
Hi Jorden,


Thanks a lot for the reply.


I am doing Correlation by VBA.


The output range is same, if it getting overwrite, it will ask "Output range will overwrite exising data".


I think the reason must what you are saying "Some "alerts" are not flipped off by using that statement."


Have a nice day.
 
Yes, that makes sense. MCorrel is a 3rd party product, so what pops up is a considered a message and not an alert - at least not to the Excel application.


I did find this forum post in which someone found success using the SendKeys command to send the "Enter" button to the prompt before it pops up:


http://www.ozgrid.com/forum/showthread.php?t=137361
 
This is the code that apparently works listed on response #5 of the link I posted.


Code:
With Application

.SendKeys "{ENTER}"

.Run "ATPVBAEN.XLAM!Mcorrel", rng, ActiveSheet.Range("$O$8"), "C" _

, False

End With




I'm not an expert on this add-in, so I can't really speak to what's going on in that second line of code. However, others have apparently had success with placing Application.SendKeys "{ENTER}"
before the Run command. If it were me, I would click on the link I posted and go through each forum response as they are from people discussing the exact same problem you describe above.
 
Back
Top