disabling message

A

Ariel

I am writing a macro that loops through the the Excel "Regression Macro"
several times. Because I want the output to replace the existing output (from
the prior loop), I get a message to the effect "Press OK to override existing
data".

How can I disable this message? I tried "Application.DisplayAlerts = False"
but it doesn't work.

Sub TestBSBeta()
'
Dim Time

Time = 0

Do Until Time = 10

Application.Run "ATPVBAEN.XLA!Regress",
ActiveSheet.Range("$H$1:$H$31"), _
ActiveSheet.Range("$J$1:$L$31"), False, True, ,
ActiveSheet.Range("$N$1") _
, False, False, False, False, , False

Application.DisplayAlerts = False


Range("O20").Select
Selection.Copy

Range("O24").Select
ActiveSheet.Paste

Time = Time + 1
Loop

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top